Elouan Le Bars
5 years ago
11 changed files with 183 additions and 153 deletions
-
2beesdoo_shift/__manifest__.py
-
4beesdoo_shift/data/system_parameter.xml
-
2beesdoo_shift/models/__init__.py
-
12beesdoo_shift/models/attendance_sheet.py
-
10beesdoo_shift/models/cooperative_status.py
-
2beesdoo_shift/models/planning.py
-
55beesdoo_shift/models/res_config_settings.py
-
2beesdoo_shift/models/task.py
-
22beesdoo_shift/tests/test_beesdoo_shift.py
-
134beesdoo_shift/views/res_config_settings_view.xml
-
91beesdoo_shift/views/res_config_view.xml
@ -1,5 +1,5 @@ |
|||
from . import attendance_sheet |
|||
from . import planning |
|||
from . import res_config |
|||
from . import res_config_settings |
|||
from . import task |
|||
from . import cooperative_status |
@ -0,0 +1,134 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<!-- |
|||
Copyright 2019-2020 Elouan Le Bars <elouan@coopiteasy.be> |
|||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
--> |
|||
<odoo> |
|||
<data> |
|||
<record model="ir.ui.view" id="daynumber_view_tree"> |
|||
<field name="name">Day Number List</field> |
|||
<field name="model">beesdoo.shift.daynumber</field> |
|||
<field name="arch" type="xml"> |
|||
<tree editable="top"> |
|||
<field name="name" /> |
|||
<field name="number" /> |
|||
<field name="active" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="type_view_tree"> |
|||
<field name="name">Shift Type List</field> |
|||
<field name="model">beesdoo.shift.type</field> |
|||
<field name="arch" type="xml"> |
|||
<tree> |
|||
<field name="name" /> |
|||
<field name="description" /> |
|||
<field name="active" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="res_config_settings_view_form" model="ir.ui.view"> |
|||
<field name="name">res.config.settings.view.form.inherit.beesdoo.shift</field> |
|||
<field name="model">res.config.settings</field> |
|||
<field name="priority" eval="50"/> |
|||
<field name="inherit_id" ref="base.res_config_settings_view_form"/> |
|||
<field name="arch" type="xml"> |
|||
<xpath expr="//div[hasclass('settings')]" position="inside"> |
|||
<div class="app_settings_block" data-string="Shifts Management" string="Shifts Management" data-key="shifts_management" groups="beesdoo_shift.group_cooperative_admin"> |
|||
<field name="has_accounting_entries" invisible="1"/> |
|||
<h2>Attendance Sheets</h2> |
|||
<div class="row mt16 o_settings_container"> |
|||
<div class="col-xs-12 col-md-6 o_setting_box"> |
|||
<div class="o_setting_left_pane"> |
|||
<field name="card_support"/> |
|||
</div> |
|||
<div class="o_setting_right_pane"> |
|||
<label for="card_support" string="Scan cards for validation" /> |
|||
<div class="text-muted"> |
|||
If not checked, user credentials are asked. |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row mt16 o_settings_container"> |
|||
<div class="col-12 col-lg-6 o_setting_box"> |
|||
<div class="o_setting_right_pane"> |
|||
<span class="o_form_label">Attendance Sheets Generation Interval</span> |
|||
<div class="text-muted"> |
|||
Generate attendance sheets before shifts start. |
|||
</div> |
|||
<div class="content-group"> |
|||
<div class="mt16 row"> |
|||
<label for="attendance_sheet_generation_interval" string="Interval (minutes)" class="col-3 col-lg-3 o_light_label"/> |
|||
<field name="attendance_sheet_generation_interval" class="oe_inline" required="1"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="row mt16 o_settings_container"> |
|||
<div class="col-12 col-lg-6 o_setting_box"> |
|||
<div class="o_setting_right_pane"> |
|||
<span class="o_form_label">Default Task Type</span> |
|||
<div class="text-muted"> |
|||
For attendance sheets automatic pre-filling. |
|||
</div> |
|||
<div class="content-group"> |
|||
<div class="mt16 row"> |
|||
<label for="task_type_default_id" string="Default Task Type" class="col-3 col-lg-3 o_light_label"/> |
|||
<field name="task_type_default_id" class="oe_inline" required="1"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</xpath> |
|||
</field> |
|||
</record> |
|||
|
|||
<menuitem name="Configuration" |
|||
id="menu_configuration_top" |
|||
parent="menu_root" |
|||
groups="beesdoo_shift.group_planning_management" |
|||
sequence="21" |
|||
/> |
|||
|
|||
<record model="ir.actions.act_window" id="action_day_number"> |
|||
<field name="name">Day Number</field> |
|||
<field name="res_model">beesdoo.shift.daynumber</field> |
|||
<field name="view_mode">tree</field> |
|||
</record> |
|||
|
|||
<menuitem name="Shift Day" id="menu_configuration_day" |
|||
parent="menu_configuration_top" action="action_day_number" /> |
|||
|
|||
<record model="ir.actions.act_window" id="action_type"> |
|||
<field name="name">Shift Type</field> |
|||
<field name="res_model">beesdoo.shift.type</field> |
|||
<field name="view_mode">tree,form</field> |
|||
</record> |
|||
|
|||
<menuitem name="Shift Type" id="menu_configuration_type" |
|||
parent="menu_configuration_top" action="action_type" /> |
|||
|
|||
<record model="ir.actions.act_window" id="action_shift_settings"> |
|||
<field name="name">Settings</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">res.config.settings</field> |
|||
<field name="view_mode">form</field> |
|||
<field name="target">inline</field> |
|||
<field name="context">{'module' : 'beesdoo_shift'}</field> |
|||
</record> |
|||
|
|||
<menuitem name="Shift Settings" |
|||
id="menu_shift_settings" |
|||
parent="menu_configuration_top" |
|||
action="action_shift_settings" |
|||
groups="beesdoo_shift.group_cooperative_admin" |
|||
/> |
|||
|
|||
</data> |
|||
</odoo> |
@ -1,91 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<!-- |
|||
Copyright 2019-2020 Elouan Le Bars <elouan@coopiteasy.be> |
|||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). |
|||
--> |
|||
<odoo> |
|||
<data> |
|||
<record model="ir.ui.view" id="daynumber_view_tree"> |
|||
<field name="name">Day Number List</field> |
|||
<field name="model">beesdoo.shift.daynumber</field> |
|||
<field name="arch" type="xml"> |
|||
<tree editable="top"> |
|||
<field name="name" /> |
|||
<field name="number" /> |
|||
<field name="active" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="type_view_tree"> |
|||
<field name="name">Shift Type List</field> |
|||
<field name="model">beesdoo.shift.type</field> |
|||
<field name="arch" type="xml"> |
|||
<tree> |
|||
<field name="name" /> |
|||
<field name="description" /> |
|||
<field name="active" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="shift_settings_view_form"> |
|||
<field name="name">Shifts Configuration Form</field> |
|||
<field name="model">beesdoo.shift.config.settings</field> |
|||
<field name="arch" type="xml"> |
|||
<form string="Settings" class="oe_form_configuration" create="false" delete="false" > |
|||
<header> |
|||
<button string="Apply" type="object" name="execute" class="oe_highlight"/> |
|||
<button string="Cancel" type="object" name="cancel" class="oe_link"/> |
|||
</header> |
|||
<separator string="General Settings"/> |
|||
<group name="Attendance Sheets"> |
|||
<field name="card_support"/> |
|||
<field name="attendance_sheet_generation_interval"/> |
|||
<field name="default_task_type_id"/> |
|||
</group> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<menuitem name="Configuration" |
|||
id="menu_configuration_top" |
|||
parent="menu_root" |
|||
groups="beesdoo_shift.group_planning_management" |
|||
sequence="21" |
|||
/> |
|||
|
|||
<record model="ir.actions.act_window" id="action_day_number"> |
|||
<field name="name">Day Number</field> |
|||
<field name="res_model">beesdoo.shift.daynumber</field> |
|||
<field name="view_mode">tree</field> |
|||
</record> |
|||
|
|||
<menuitem name="Shift Day" id="menu_configuration_day" |
|||
parent="menu_configuration_top" action="action_day_number" /> |
|||
|
|||
<record model="ir.actions.act_window" id="action_type"> |
|||
<field name="name">Shift Type</field> |
|||
<field name="res_model">beesdoo.shift.type</field> |
|||
<field name="view_mode">tree,form</field> |
|||
</record> |
|||
|
|||
<menuitem name="Shift Type" id="menu_configuration_type" |
|||
parent="menu_configuration_top" action="action_type" /> |
|||
|
|||
<record model="ir.actions.act_window" id="action_shift_settings"> |
|||
<field name="name">Settings</field> |
|||
<field name="res_model">beesdoo.shift.config.settings</field> |
|||
<field name="view_mode">form</field> |
|||
<field name="target">inline</field> |
|||
</record> |
|||
|
|||
<menuitem name="Settings" |
|||
id="menu_shift_settings" |
|||
parent="menu_configuration_top" |
|||
action="action_shift_settings" |
|||
groups="beesdoo_shift.group_cooperative_admin" |
|||
/> |
|||
|
|||
</data> |
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue