Permalink
Browse files

[IMP] Rename in res.groups and add Master categories for ir.module.ca…

…tegory

Rename 'Manager' to 'Administrator' in user.groups.
Add Master categories for ir.module.category. It is used to organise fields of Access Rigths view.
Add a user.groups (Approver) in Expenses and Timesheet.
If a user has no special access right for Document, he can't see the application in the app switcher.
  • Loading branch information...
jbm-odoo committed Dec 7, 2018
1 parent f0d5a5b commit 24d03cb406dbae6d62ed4db9b5393fe7cbdd3cca
@@ -36,7 +36,7 @@
</record>

<record id="group_account_manager" model="res.groups">
<field name="name">Billing Manager</field>
<field name="name">Billing Administrator</field>
<field name="category_id" ref="base.module_category_accounting_and_finance"/>
<field name="implied_ids" eval="[(4, ref('group_account_invoice'))]"/>
</record>
@@ -8,7 +8,7 @@
</record>

<record id="group_event_manager" model="res.groups">
<field name="name">Manager</field>
<field name="name">Administrator</field>
<field name="category_id" ref="base.module_category_event_management"/>
<field name="implied_ids" eval="[(4, ref('group_event_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
@@ -3,14 +3,15 @@
<record id="module_fleet_category" model="ir.module.category">
<field name="name">Fleet</field>
<field name="sequence">17</field>
<field name="master_category_id" ref="base.hr"/>
</record>
<record id="fleet_group_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="module_fleet_category"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
</record>
<record id="fleet_group_manager" model="res.groups">
<field name="name">Manager</field>
<field name="name">Administrator</field>
<field name="implied_ids" eval="[(4, ref('fleet_group_user'))]"/>
<field name="category_id" ref="module_fleet_category"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
@@ -81,32 +82,32 @@
<field name="domain_force">[('driver_id','=',user.partner_id.id)]</field>
</record>
<record id="fleet_rule_contract_visibility_manager" model="ir.rule">
<field name="name">Manager has all rights on vehicle's contracts</field>
<field name="name">Administrator has all rights on vehicle's contracts</field>
<field name="model_id" ref="model_fleet_vehicle_log_contract"/>
<field name="groups" eval="[(4, ref('fleet_group_manager'))]"/>
</record>
<record id="fleet_rule_cost_visibility_manager" model="ir.rule">
<field name="name">Manager has all rights on vehicle's costs</field>
<field name="name">Administrator has all rights on vehicle's costs</field>
<field name="model_id" ref="model_fleet_vehicle_cost"/>
<field name="groups" eval="[(4, ref('fleet_group_manager'))]"/>
</record>
<record id="fleet_rule_service_visibility_manager" model="ir.rule">
<field name="name">Manager has all rights on vehicle's services</field>
<field name="name">Administrator has all rights on vehicle's services</field>
<field name="model_id" ref="model_fleet_vehicle_log_services"/>
<field name="groups" eval="[(4, ref('fleet_group_manager'))]"/>
</record>
<record id="fleet_rule_odometer_visibility_manager" model="ir.rule">
<field name="name">Manager has all rights on vehicle's vehicle's odometer</field>
<field name="name">Administrator has all rights on vehicle's vehicle's odometer</field>
<field name="model_id" ref="model_fleet_vehicle_odometer"/>
<field name="groups" eval="[(4, ref('fleet_group_manager'))]"/>
</record>
<record id="fleet_rule_fuel_log_visibility_manager" model="ir.rule">
<field name="name">Manager has all rights on vehicle's fuel log</field>
<field name="name">Administrator has all rights on vehicle's fuel log</field>
<field name="model_id" ref="model_fleet_vehicle_log_fuel"/>
<field name="groups" eval="[(4, ref('fleet_group_manager'))]"/>
</record>
<record id="fleet_rule_vehicle_visibility_manager" model="ir.rule">
<field name="name">Manager has all rights on vehicle</field>
<field name="name">Administrator has all rights on vehicle</field>
<field name="model_id" ref="model_fleet_vehicle"/>
<field name="groups" eval="[(4, ref('fleet_group_manager'))]"/>
</record>
@@ -9,7 +9,7 @@
</record>

<record id="group_hr_manager" model="res.groups">
<field name="name">Manager</field>
<field name="name">Administrator</field>
<field name="comment">The user will have access to the human resources configuration as well as statistic reports.</field>
<field name="category_id" ref="base.module_category_human_resources"/>
<field name="implied_ids" eval="[(4, ref('group_hr_user'))]"/>
@@ -8,7 +8,7 @@
</record>

<record id="group_hr_attendance_manager" model="res.groups">
<field name="name">Manager</field>
<field name="name">Administrator</field>
<field name="category_id" ref="base.module_category_hr_attendance"/>
<field name="implied_ids" eval="[(4, ref('hr_attendance.group_hr_attendance_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
@@ -2,7 +2,7 @@
<odoo>
<data noupdate="1">
<record id="hr_contract.group_hr_contract_manager" model="res.groups">
<field name="name">Manager</field>
<field name="name">Administrator</field>
<field name="category_id" ref="base.module_category_hr_contract"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
</record>
@@ -1,13 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="group_hr_expense_approver" model="res.groups">
<field name="name">Approver</field>
<field name="category_id" ref="base.module_category_hr_expense"/>
</record>

<record id="group_hr_expense_user" model="res.groups">
<field name="name">Officer</field>
<field name="name">See all Expenses</field>
<field name="category_id" ref="base.module_category_hr_expense"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="implied_ids" eval="[(4, ref('base.group_user')), (4, ref('hr_expense.group_hr_expense_approver'))]"/>
</record>

<record id="group_hr_expense_manager" model="res.groups">
<field name="name">Manager</field>
<field name="name">Administrator</field>
<field name="category_id" ref="base.module_category_hr_expense"/>
<field name="implied_ids" eval="[(4, ref('hr_expense.group_hr_expense_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
@@ -16,4 +21,14 @@
<record id="base.default_user" model="res.users">
<field name="groups_id" eval="[(4,ref('hr_expense.group_hr_expense_manager'))]"/>
</record>

<record id="hr_expense_rule_approver_update" model="ir.rule">
<field name="name">Expenses: approver: write on employee's expense in his team</field>
<field name="model_id" ref="model_hr_expense"/>
<field name="domain_force">[('employee_id.expense_manager_id', '=' , user.id)]</field>
<field name="perm_read" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="groups" eval="[(4, ref('hr_expense.group_hr_expense_approver'))]"/>
</record>
</odoo>
@@ -2,18 +2,18 @@
<odoo>

<record id="group_hr_holidays_team_leader" model="res.groups">
<field name="name">Team Leader</field>
<field name="name">Approver</field>
<field name="category_id" ref="base.module_category_hr_holidays"/>
</record>

<record id="group_hr_holidays_user" model="res.groups">
<field name="name">Officer</field>
<field name="name">See all Time Off</field>
<field name="category_id" ref="base.module_category_hr_holidays"/>
<field name="implied_ids" eval="[(4, ref('hr.group_hr_user')), (4, ref('group_hr_holidays_team_leader'))]"/>
</record>

<record id="group_hr_holidays_manager" model="res.groups">
<field name="name">Manager</field>
<field name="name">Administrator</field>
<field name="category_id" ref="base.module_category_hr_holidays"/>
<field name="implied_ids" eval="[(4, ref('hr_holidays.group_hr_holidays_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
@@ -24,7 +24,7 @@
</record>

<record id="hr_leave_rule_employee" model="ir.rule">
<field name="name">Leaves: employee: read all</field>
<field name="name">Time Off: employee: read all</field>
<field name="model_id" ref="model_hr_leave"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="perm_create" eval="False"/>
@@ -34,15 +34,15 @@
</record>

<record id="hr_leave_rule_employee_update" model="ir.rule">
<field name="name">Leaves: employee: create/write/unlink not validated own</field>
<field name="name">Time Off: employee: create/write/unlink not validated own</field>
<field name="model_id" ref="model_hr_leave"/>
<field name="domain_force">[('employee_id.user_id','=',user.id), ('state', 'in', ['draft', 'confirm', 'cancel', 'refuse'])]</field>
<field name="perm_read" eval="False"/>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>

<record id="hr_leave_rule_team_leader_update" model="ir.rule">
<field name="name">Leaves: Team Leader: write on employee's leaves in his team</field>
<field name="name">Time Off: approver: write on employee's time off in his team</field>
<field name="model_id" ref="model_hr_leave"/>
<field name="domain_force">[('employee_id.leave_manager_id', '=' , user.id)]</field>
<field name="perm_read" eval="False"/>
@@ -52,7 +52,7 @@
</record>

<record id="hr_leave_rule_officer_read" model="ir.rule">
<field name="name">Leaves: officer: read all</field>
<field name="name">Time Off: see all time off: read all</field>
<field name="model_id" ref="model_hr_leave"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="perm_create" eval="False"/>
@@ -62,7 +62,7 @@
</record>

<record id="hr_leave_rule_officer_update" model="ir.rule">
<field name="name">Leaves: officer: create/write/unlink own + managed employee + without department + same or managed department</field>
<field name="name">Time Off: see all time off: create/write/unlink own + managed employee + without department + same or managed department</field>
<field name="model_id" ref="model_hr_leave"/>
<field name="domain_force">['|',
'|', ('employee_id.user_id', '=', user.id), ('employee_id.parent_id.user_id', '=', user.id),
@@ -72,14 +72,14 @@
</record>

<record id="hr_leave_rule_manager" model="ir.rule">
<field name="name">Leaves: manager: no limit</field>
<field name="name">Time Off: administrator: no limit</field>
<field name="model_id" ref="model_hr_leave"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4, ref('group_hr_holidays_manager'))]"/>
</record>

<record id="hr_leave_rule_multicompany" model="ir.rule">
<field name="name">Leaves: multi company global rule</field>
<field name="name">Time Off: multi company global rule</field>
<field name="model_id" ref="model_hr_leave"/>
<field name="global" eval="True"/>
<field name="domain_force">['|', ('holiday_status_id.company_id', '=', False), ('holiday_status_id.company_id', 'in', [user.company_id.id])]</field>
@@ -104,7 +104,7 @@
</record>

<record id="hr_leave_allocation_rule_officer_read" model="ir.rule">
<field name="name">Allocations: officer: read all</field>
<field name="name">Allocations: see all time off: read all</field>
<field name="model_id" ref="model_hr_leave_allocation"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="perm_create" eval="False"/>
@@ -114,7 +114,7 @@
</record>

<record id="hr_leave_allocation_rule_officer_update" model="ir.rule">
<field name="name">Allocations: officer: create/write/unlink own + managed employee + without department + same or managed department</field>
<field name="name">Allocations: see all time off: create/write/unlink own + managed employee + without department + same or managed department</field>
<field name="model_id" ref="model_hr_leave_allocation"/>
<field name="domain_force">['|',
'|', ('employee_id.user_id', '=', user.id), ('employee_id.parent_id.user_id', '=', user.id),
@@ -123,21 +123,21 @@
</record>

<record id="hr_leave_allocation_rule_manager" model="ir.rule">
<field name="name">Allocations: manager: no limit</field>
<field name="name">Allocations: administrator: no limit</field>
<field name="model_id" ref="model_hr_leave_allocation"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4, ref('group_hr_holidays_manager'))]"/>
</record>

<record id="resource_leaves_team_leader" model="ir.rule">
<field name="name">Leaves Resources: Team Leader</field>
<field name="name">Time Off Resources: Approver</field>
<field name="model_id" ref="model_resource_calendar_leaves"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4, ref('hr_holidays.group_hr_holidays_team_leader'))]"/>
</record>

<record id="hr_holidays_status_rule_multi_company" model="ir.rule">
<field name="name">Leaves multi company rule</field>
<field name="name">Time Off multi company rule</field>
<field name="model_id" ref="model_hr_leave_type"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','in',[user.company_id.id])]</field>
@@ -9,7 +9,7 @@
</record>

<record id="group_hr_payroll_manager" model="res.groups">
<field name="name">Manager</field>
<field name="name">Administrator</field>
<field name="category_id" ref="base.module_category_hr_payroll"/>
<field name="implied_ids" eval="[(4, ref('hr_payroll.group_hr_payroll_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
@@ -16,7 +16,7 @@
</record>

<record id="group_hr_recruitment_manager" model="res.groups">
<field name="name">Manager</field>
<field name="name">Administrator</field>
<field name="category_id" ref="base.module_category_hr_recruitment"/>
<field name="implied_ids" eval="[(4, ref('group_hr_recruitment_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
@@ -1,17 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>

<data noupdate="1">
<record id="group_hr_timesheet_approver" model="res.groups">
<field name="name">Approver</field>
<field name="category_id" ref="base.module_category_hr_timesheet"/>
</record>

<record id="group_hr_timesheet_user" model="res.groups">
<field name="name">User</field>
<field name="name">See all Timesheets</field>
<field name="category_id" ref="base.module_category_hr_timesheet"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="implied_ids" eval="[(4, ref('base.group_user')), (4, ref('group_hr_timesheet_approver'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
</record>

<record id="group_timesheet_manager" model="res.groups">
<field name="name">Manager</field>
<field name="name">Administrator</field>
<field name="category_id" ref="base.module_category_hr_timesheet"/>
<field name="implied_ids" eval="[(4, ref('group_hr_timesheet_user')), (4, ref('hr.group_hr_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
@@ -20,7 +23,6 @@
<record id="base.default_user" model="res.users">
<field name="groups_id" eval="[(4,ref('group_hr_timesheet_user'))]"/>
</record>

</data>

<data noupdate="0">
@@ -4,6 +4,7 @@
<record id="module_category_im_livechat" model="ir.module.category">
<field name="name">Live Support</field>
<field name="sequence" eval="20" />
<field name="master_category_id" ref="base.web"/>
</record>

<record id="im_livechat_group_user" model="res.groups">
@@ -13,7 +14,7 @@
</record>

<record id="im_livechat_group_manager" model="res.groups">
<field name="name">Manager</field>
<field name="name">Administrator</field>
<field name="comment">The user will be able to delete support channels.</field>
<field name="category_id" ref="module_category_im_livechat"/>
<field name="implied_ids" eval="[(4, ref('im_livechat.im_livechat_group_user'))]"/>
@@ -4,13 +4,14 @@
<field name="name">Lunch</field>
<field name="description">Helps you handle your lunch needs, if you are a manager you will be able to create new products, cashmoves and to confirm or cancel orders.</field>
<field name="sequence">16</field>
<field name="master_category_id" ref="base.hr"/>
</record>
<record id="group_lunch_user" model="res.groups">
<field name="name">User</field>
<field name="category_id" ref="module_lunch_category"/>
</record>
<record id="group_lunch_manager" model="res.groups">
<field name="name">Manager</field>
<field name="name">Administrator</field>
<field name="implied_ids" eval="[(4, ref('group_lunch_user'))]"/>
<field name="category_id" ref="module_lunch_category"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
@@ -8,7 +8,7 @@
<field name="category_id" ref="base.module_category_manufacturing"/>
</record>
<record id="group_mrp_manager" model="res.groups">
<field name="name">Manager</field>
<field name="name">Administrator</field>
<field name="category_id" ref="base.module_category_manufacturing"/>
<field name="implied_ids" eval="[(4, ref('group_mrp_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
@@ -5,7 +5,7 @@
<field name="category_id" ref="base.module_category_point_of_sale"/>
</record>
<record id="group_pos_manager" model="res.groups">
<field name="name">Manager</field>
<field name="name">Administrator</field>
<field name="category_id" ref="base.module_category_point_of_sale"/>
<field name="implied_ids" eval="[(4, ref('group_pos_user')), (4, ref('stock.group_stock_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
@@ -8,7 +8,7 @@
</record>

<record id="group_project_manager" model="res.groups">
<field name="name">Manager</field>
<field name="name">Administrator</field>
<field name="category_id" ref="base.module_category_project_management"/>
<field name="implied_ids" eval="[(4, ref('group_project_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
Oops, something went wrong.

0 comments on commit 24d03cb

Please sign in to comment.