Browse Source

[MIG] b_shift : fix security groups

pull/143/head
Elouan Le Bars 5 years ago
parent
commit
19dcf1611e
  1. 34
      beesdoo_shift/security/group.xml
  2. 2
      beesdoo_shift/views/task_template.xml

34
beesdoo_shift/security/group.xml

@ -1,32 +1,36 @@
<odoo> <odoo>
<record id="group_shift_attendance_sheet" model="res.groups"> <record id="group_shift_attendance_sheet" model="res.groups">
<field name="name">Attendance Sheet Generic Access</field> <field name="name">Attendance Sheet Generic Access</field>
<field name="category_id" ref="base.module_category_cooperative_management"/>
<field name="category_id"
ref="base.module_category_cooperative_management"/>
</record> </record>
<record id="group_shift_attendance" model="res.groups"> <record id="group_shift_attendance" model="res.groups">
<field name="name">Shift and Worker Access</field> <field name="name">Shift and Worker Access</field>
<field name="category_id" ref="base.module_category_cooperative_management"/>
<field name="category_id"
ref="base.module_category_cooperative_management"/>
</record> </record>
<record id="group_shift_management" model="res.groups"> <record id="group_shift_management" model="res.groups">
<field name="name">Shift Management</field> <field name="name">Shift Management</field>
<field name="category_id" ref="base.module_category_cooperative_management"/>
<field name="implied_ids" eval="[(4, ref('group_shift_attendance'))]"/>
<field name="category_id"
ref="base.module_category_cooperative_management"/>
<field name="implied_ids"
eval="[(4, ref('group_shift_attendance'))]"/>
</record> </record>
<record id="group_planning_management" model="res.groups"> <record id="group_planning_management" model="res.groups">
<field name="name">Planning Management</field> <field name="name">Planning Management</field>
<field name="category_id" ref="base.module_category_cooperative_management"/>
<field name="implied_ids" eval="[(4, ref('group_shift_management'))]"/>
<field name="category_id"
ref="base.module_category_cooperative_management"/>
<field name="implied_ids"
eval="[(4, ref('group_shift_management'))]"/>
</record> </record>
<record id="group_cooperative_admin" model="res.groups"> <record id="group_cooperative_admin" model="res.groups">
<field name="name">Cooperative Admin</field> <field name="name">Cooperative Admin</field>
<field name="category_id" ref="base.module_category_cooperative_management"/>
<field name="implied_ids" eval="[(6, 0, [ref('group_planning_management'),
ref('group_shift_attendance_sheet')])]"
/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
<!-- Could the following be removed ? -->
<record model="ir.ui.menu" id="base.menu_board_root">
<field name="groups_id" eval="[(6,0,[ref('group_shift_attendance_sheet')])]"/>
<field name="category_id"
ref="base.module_category_cooperative_management"/>
<field name="implied_ids"
eval="[(4, ref('group_planning_management')), (4, ref('group_shift_attendance_sheet'))]" />
<field name="users"
eval="[(4, ref('base.user_root')),
(4, ref('base.user_admin'))]"/>
</record> </record>
</odoo> </odoo>

2
beesdoo_shift/views/task_template.xml

@ -177,7 +177,7 @@
</record> </record>
<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,beesdoo_shift.group_shift_attendance" />
<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" /> sequence="20" />

Loading…
Cancel
Save