Browse Source

[REF] b_shift : views order and definition

pull/125/head
Elouan Le Bars 5 years ago
parent
commit
279d09aef8
  1. 1
      beesdoo_shift/__openerp__.py
  2. 44
      beesdoo_shift/views/attendance_sheet.xml
  3. 46
      beesdoo_shift/views/attendance_sheet_admin.xml
  4. 2
      beesdoo_shift/views/planning.xml
  5. 3
      beesdoo_shift/views/task_template.xml

1
beesdoo_shift/__openerp__.py

@ -31,7 +31,6 @@
"views/exempt_reason.xml", "views/exempt_reason.xml",
"wizard/validate_attendance_sheet.xml", "wizard/validate_attendance_sheet.xml",
"views/attendance_sheet.xml", "views/attendance_sheet.xml",
"views/attendance_sheet_admin.xml",
"wizard/instanciate_planning.xml", "wizard/instanciate_planning.xml",
"wizard/batch_template.xml", "wizard/batch_template.xml",
"wizard/assign_super_coop.xml", "wizard/assign_super_coop.xml",

44
beesdoo_shift/views/attendance_sheet.xml

@ -196,10 +196,26 @@
</record> </record>
<!-- Actions --> <!-- Actions -->
<!-- This method would be better but library "fields" is not imported -->
<!--
domain="[('end_time','&gt;',fields.Datetime.to_string(datetime.date.today())),
('start_time','&lt;', fields.Datetime.to_string(datetime.date.today() + datetime.timedelta(days=1)))]" -->
<act_window id="action_sheet_admin_non_validated"
name="Non-validated sheets"
res_model="beesdoo.shift.sheet"
view_mode="tree,form"
domain="[('state','=','not_validated')]"
/>
<!-- Annotated sheets should display only the both annotated and validated ones-->
<act_window id="action_sheet_admin_annotated"
name="Unread annotations"
res_model="beesdoo.shift.sheet"
view_mode="tree,form"
domain="[('is_annotated','=',True),
('is_read','=',False)]"
/>
<act_window id="action_sheet_admin_list"
name="All sheets"
res_model="beesdoo.shift.sheet"
view_mode="tree,form"
/>
<act_window id="action_sheet_daily" <act_window id="action_sheet_daily"
name="Daily attendance sheets" name="Daily attendance sheets"
res_model="beesdoo.shift.sheet" res_model="beesdoo.shift.sheet"
@ -213,6 +229,7 @@
name="Attendance Sheets" name="Attendance Sheets"
parent="menu_root" parent="menu_root"
groups="beesdoo_shift.group_shift_attendance_sheet" groups="beesdoo_shift.group_shift_attendance_sheet"
sequence="1"
/> />
<!-- Menu actions --> <!-- Menu actions -->
@ -222,5 +239,22 @@
action="action_sheet_daily" action="action_sheet_daily"
sequence="2" sequence="2"
/> />
<menuitem id="menu_sheet_admin_non_validated"
name="Non-validated sheets"
parent="menu_sheet_top"
action="action_sheet_admin_non_validated"
groups="beesdoo_shift.group_cooperative_admin"
/>
<menuitem id="menu_sheet_admin_annotated"
name="Unread annotations"
parent="menu_sheet_top"
action="action_sheet_admin_annotated"
groups="beesdoo_shift.group_cooperative_admin"
/>
<menuitem id="menu_sheet_admin_list"
name="All sheets"
parent="menu_sheet_top"
action="action_sheet_admin_list"
groups="beesdoo_shift.group_cooperative_admin"
/>
</odoo> </odoo>

46
beesdoo_shift/views/attendance_sheet_admin.xml

@ -1,46 +0,0 @@
<odoo>
<act_window id="action_sheet_admin_non_validated"
name="Non-validated sheets"
res_model="beesdoo.shift.sheet"
view_mode="tree,form"
domain="[('state','=','not_validated')]"
/>
<!-- Annotated sheets should display only the both annotated and validated ones-->
<act_window id="action_sheet_admin_annotated"
name="Unread annotations"
res_model="beesdoo.shift.sheet"
view_mode="tree,form"
domain="[('is_annotated','=',True),
('is_read','=',False)]"
/>
<act_window id="action_sheet_admin_list"
name="All sheets"
res_model="beesdoo.shift.sheet"
view_mode="tree,form"
/>
<!-- Top menu item -->
<menuitem id="menu_sheet_admin_top"
name="Attendance Sheets Administration"
parent="menu_root"
groups="beesdoo_shift.group_cooperative_admin"
/>
<!-- Menu actions -->
<menuitem id="menu_sheet_admin_non_validated"
name="Non-validated sheets"
parent="menu_sheet_admin_top"
action="action_sheet_admin_non_validated"
/>
<menuitem id="menu_sheet_admin_annotated"
name="Unread annotations"
parent="menu_sheet_admin_top"
action="action_sheet_admin_annotated"
/>
<menuitem id="menu_sheet_admin_list"
name="All sheets"
parent="menu_sheet_admin_top"
action="action_sheet_admin_list"
/>
</odoo>

2
beesdoo_shift/views/planning.xml

@ -69,6 +69,6 @@
</record> </record>
<menuitem name="Planning Week" id="menu_planning" parent="menu_template_top" <menuitem name="Planning Week" id="menu_planning" parent="menu_template_top"
sequence="10" action="action_planning" />
sequence="20" action="action_planning" />
</odoo> </odoo>

3
beesdoo_shift/views/task_template.xml

@ -180,7 +180,8 @@
<menuitem name="Shift Management" id="menu_root" <menuitem name="Shift Management" id="menu_root"
groups="beesdoo_shift.group_shift_attendance_sheet" /> groups="beesdoo_shift.group_shift_attendance_sheet" />
<menuitem name="Templates" id="menu_template_top" parent="menu_root" <menuitem name="Templates" id="menu_template_top" parent="menu_root"
groups="beesdoo_shift.group_shift_management" />
groups="beesdoo_shift.group_shift_management"
sequence="20" />
<record model="ir.actions.act_window" id="action_generate_shift_template_wizard"> <record model="ir.actions.act_window" id="action_generate_shift_template_wizard">

Loading…
Cancel
Save