Skip to content

Commit

Permalink
[ADD] #20 standard user groups
Browse files Browse the repository at this point in the history
  • Loading branch information
hbrunn committed Oct 2, 2023
1 parent fbc4280 commit 917f5a6
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
3 changes: 3 additions & 0 deletions verdigado_attendance/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
"views/hr_leave_type.xml",
"views/hr_menu_human_resources_configuration.xml",
],
"demo": [
"demo/res_users.xml",
],
"assets": {
"web._assets_primary_variables": [
"verdigado_attendance/static/src/scss/primary_variables.scss",
Expand Down
18 changes: 18 additions & 0 deletions verdigado_attendance/demo/res_users.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="verdigado_user" model="res.users">
<field name="login">verdigado_employee</field>
<field name="name">Verdigado employee</field>
<field name="groups_id" eval="[(6, 0, [ref('group_verdigado_employee')])]" />
</record>
<record id="verdigado_officer" model="res.users">
<field name="login">verdigado_officer</field>
<field name="name">Verdigado officer</field>
<field name="groups_id" eval="[(6, 0, [ref('group_verdigado_officer')])]" />
</record>
<record id="verdigado_manager" model="res.users">
<field name="login">verdigado_manager</field>
<field name="name">Verdigado manager</field>
<field name="groups_id" eval="[(6, 0, [ref('group_verdigado_manager')])]" />
</record>
</odoo>
28 changes: 28 additions & 0 deletions verdigado_attendance/security/verdigado_attendance.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!-- groups -->
<record id="module_category_verdigado" model="ir.module.category">
<field name="name">Verdigado</field>
</record>
<record id="group_verdigado_employee" model="res.groups">
<field name="name">Employee</field>
<field name="category_id" ref="module_category_verdigado" />
<field
name="implied_ids"
eval="[(6, 0, [ref('hr_attendance.group_hr_attendance'), ref('base.group_user')])]"
/>
</record>
<record id="group_verdigado_officer" model="res.groups">
<field name="name">Officer</field>
<field name="category_id" ref="module_category_verdigado" />
<field
name="implied_ids"
eval="[(6, 0, [ref('group_verdigado_employee'), ref('hr.group_hr_user'), ref('hr_attendance.group_hr_attendance_user'), ref('hr_holidays.group_hr_holidays_user')])]"
/>
</record>
<record id="group_verdigado_manager" model="res.groups">
<field name="name">Manager</field>
<field name="category_id" ref="module_category_verdigado" />
<field
name="implied_ids"
eval="[(6, 0, [ref('group_verdigado_officer'), ref('hr.group_hr_manager'), ref('hr_attendance.group_hr_attendance_manager'), ref('hr_holidays.group_hr_holidays_manager')])]"
/>
</record>
<!-- hr.employee -->
<record id="rule_hr_employee_user" model="ir.rule">
<field name="name">Restrict HR users to their own employees</field>
Expand Down

0 comments on commit 917f5a6

Please sign in to comment.