19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:00 +01:00
parent a1137a1456
commit e1d89e11e3
2789 changed files with 1093187 additions and 605897 deletions

View file

@ -1,34 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="base.module_category_human_resources_employees" model="ir.module.category">
<record model="res.groups.privilege" id="res_groups_privilege_employees">
<field name="name">Employees</field>
<field name="sequence">9</field>
<field name="category_id" ref="base.module_category_human_resources"/>
</record>
<record id="group_hr_user" model="res.groups">
<field name="name">Officer : Manage all employees</field>
<field name="category_id" ref="base.module_category_human_resources_employees"/>
<field name="implied_ids" eval="[(6, 0, [ref('base.group_private_addresses'), ref('base.group_user')])]"/>
<field name="comment">The user will be able to approve document created by employees.</field>
<field name="name">Officer: Manage all employees</field>
<field name="sequence">10</field>
<field name="privilege_id" ref="res_groups_privilege_employees"/>
<field name="implied_ids" eval="[(6, 0, [ref('base.group_user')])]"/>
<field name="comment">The user will be able to create and edit employees.</field>
</record>
<record id="group_hr_manager" model="res.groups">
<field name="name">Administrator</field>
<field name="sequence">20</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_employees"/>
<field name="privilege_id" ref="res_groups_privilege_employees"/>
<field name="implied_ids" eval="[(4, ref('group_hr_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
<field name="user_ids" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
</record>
<data noupdate="1">
<record id="base.default_user" model="res.users">
<field name="groups_id" eval="[(4,ref('group_hr_manager'))]"/>
</record>
<record id="hr_employee_comp_rule" model="ir.rule">
<field name="name">Employee multi company rule</field>
<field name="model_id" ref="model_hr_employee"/>
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
<field name="domain_force">['|', '|', '|',
('company_id', 'in', company_ids + [False]),
('parent_id.user_id', '=', user.id),
('id', '=', user.employee_id.parent_id.id),
('user_id', '=', user.id)
]</field>
</record>
<record id="hr_dept_comp_rule" model="ir.rule">
@ -40,7 +45,12 @@
<record id="hr_employee_public_comp_rule" model="ir.rule">
<field name="name">Employee multi company rule</field>
<field name="model_id" ref="model_hr_employee_public"/>
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
<field name="domain_force">['|', '|', '|',
('company_id', 'in', company_ids + [False]),
('parent_id.user_id', '=', user.id),
('id', '=', user.employee_id.parent_id.id),
('user_id', '=', user.id)
]</field>
</record>
<record id="hr_job_comp_rule" model="ir.rule">
@ -49,18 +59,6 @@
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
</record>
<record id="hr_plan_company_rule" model="ir.rule">
<field name="name">Plan multi-company rule</field>
<field name="model_id" ref="model_hr_plan"/>
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
</record>
<record id="hr_plan_activity_type_company_rule" model="ir.rule">
<field name="name">Plan Activity Type multi-company rule</field>
<field name="model_id" ref="model_hr_plan_activity_type"/>
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
</record>
<record id="ir_rule_res_partner_bank_internal_users" model="ir.rule">
<field name="name">HR: Prevent non HR officers from accessing employee bank accounts</field>
<field name="model_id" ref="base.model_res_partner_bank"/>
@ -74,5 +72,53 @@
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4, ref('hr.group_hr_user'))]"/>
</record>
<record id="ir_rule_hr_contract_type_multi_company" model="ir.rule">
<field name="name">HR Contract Type: Multi Company</field>
<field name="model_id" ref="model_hr_contract_type"/>
<field name="domain_force">['|', ('country_id', '=', False), ('country_id', 'in', user.env.companies.country_id.ids)]</field>
</record>
<record id="mail_plan_rule_group_hr_manager" model="ir.rule">
<field name="name">Manager can edit employee plan</field>
<field name="groups" eval="[(4, ref('group_hr_manager'))]"/>
<field name="model_id" ref="mail.model_mail_activity_plan"/>
<field name="domain_force">[('res_model', '=', 'hr.employee')]</field>
<field name="perm_read" eval="False"/>
</record>
<record id="mail_plan_templates_rule_group_hr_manager" model="ir.rule">
<field name="name">Manager can edit employee plan template</field>
<field name="groups" eval="[(4, ref('group_hr_manager'))]"/>
<field name="model_id" ref="mail.model_mail_activity_plan_template"/>
<field name="domain_force">[('plan_id.res_model', '=', 'hr.employee')]</field>
<field name="perm_read" eval="False"/>
</record>
<record id="ir_rule_hr_departure_reason_multi_company" model="ir.rule">
<field name="name">Departure Reason: multi company</field>
<field name="model_id" ref="model_hr_departure_reason"/>
<field name="domain_force">[('country_code', 'in', user.env.companies.mapped('country_code') + [False])]</field>
</record>
<record id="ir_rule_hr_contract_manager" model="ir.rule">
<field name="name">HR Contract: Contract Manager</field>
<field name="model_id" ref="model_hr_version"/>
<field name="groups" eval="[(4, ref('group_hr_manager'))]"/>
<field name="domain_force">[(1, '=', 1)]</field>
</record>
<record id="ir_rule_hr_contract_multi_company" model="ir.rule">
<field name="name">HR Contract: Multi Company</field>
<field name="model_id" ref="model_hr_version"/>
<field name="domain_force">[('company_id', 'in', company_ids)]</field>
</record>
<record id="ir_rule_hr_payroll_structure_type_multi_company" model="ir.rule">
<field name="name">HR Payroll Structure Type: Multi Company</field>
<field name="model_id" ref="model_hr_payroll_structure_type"/>
<field name="global" eval="True"/>
<field name="domain_force">['|', ('country_id', '=', False), ('country_id', 'in', user.env.companies.mapped('country_id').ids)]</field>
</record>
</data>
</odoo>

View file

@ -8,13 +8,20 @@ access_hr_employee_resource_user,resource.resource.user,resource.model_resource_
access_hr_department_user,hr.department.user,model_hr_department,group_hr_user,1,1,1,1
access_hr_department_employee,hr.department.employee,model_hr_department,base.group_user,1,0,0,0
access_hr_job_user,hr.job user,model_hr_job,group_hr_user,1,1,1,1
access_hr_plan_activity_type_employee,access_hr_plan_activity_type,model_hr_plan_activity_type,base.group_user,1,0,0,0
access_hr_plan_employee,access_hr_plan_employee,model_hr_plan,base.group_user,1,0,0,0
access_hr_plan_activity_type_hr_user,access_hr_plan_activity_type,model_hr_plan_activity_type,group_hr_user,1,1,1,1
access_hr_plan_hr_user,access_hr_plan_hr_user,model_hr_plan,group_hr_user,1,1,1,1
access_hr_plan_wizard,access.hr.plan.wizard,model_hr_plan_wizard,hr.group_hr_user,1,1,1,0
access_hr_departure_wizard,access.hr.departure.wizard,model_hr_departure_wizard,hr.group_hr_user,1,1,1,0
access_hr_job_employee,hr.job.employee,model_hr_job,base.group_user,1,0,0,0
access_hr_departure_wizard,access.hr.departure.wizard,model_hr_departure_wizard,group_hr_user,1,1,1,0
access_hr_bank_account_allocation_wizard,access.hr.bank.account.allocation.wizard,model_hr_bank_account_allocation_wizard,group_hr_user,1,1,1,0
access_hr_bank_account_allocation_wizard_line,access.hr.bank.account.allocation.wizard.line,model_hr_bank_account_allocation_wizard_line,group_hr_user,1,1,1,1
access_hr_version_wizard,access.hr.version.wizard,model_hr_version_wizard,group_hr_user,1,1,1,0
access_hr_work_location_user,access_hr_work_location_user,model_hr_work_location,base.group_user,1,0,0,0
access_hr_work_location_manager,access_hr_work_location_manager,model_hr_work_location,group_hr_manager,1,1,1,1
access_hr_departure_reason,access_hr_departure_reason_user,model_hr_departure_reason,group_hr_user,1,1,1,1
access_hr_contract_type_manager,hr.contract.type.manager,model_hr_contract_type,hr.group_hr_user,1,1,1,1
access_hr_contract_type_manager,hr.contract.type.manager,model_hr_contract_type,group_hr_user,1,1,1,1
access_hr_version_manager,hr.version.manager,model_hr_version,group_hr_manager,1,1,1,1
access_hr_version_user,hr.version.user,model_hr_version,group_hr_user,1,1,1,1
access_mail_activity_plan_hr_manager,mail.activity.plan.hr.manager,mail.model_mail_activity_plan,group_hr_manager,1,1,1,1
access_mail_activity_plan_template_hr_manager,mail.activity.plan.template.hr.manager,mail.model_mail_activity_plan_template,group_hr_manager,1,1,1,1
access_hr_payroll_structure_type_hr_contract_manager,hr.payroll.structure.type.contract.manager,model_hr_payroll_structure_type,group_hr_manager,1,1,1,1
access_hr_resource_manager,hr.employee.resource.manager,resource.model_resource_resource,hr.group_hr_manager,1,1,1,1
access_hr_resource_calendar_user,hr.employee.resource.calendar.user,resource.model_resource_calendar,hr.group_hr_user,1,1,1,1
access_hr_resource_calendar_attendance_user,hr.employee.resource.calendar.attendance.user,resource.model_resource_calendar_attendance,hr.group_hr_user,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
8 access_hr_department_user hr.department.user model_hr_department group_hr_user 1 1 1 1
9 access_hr_department_employee hr.department.employee model_hr_department base.group_user 1 0 0 0
10 access_hr_job_user hr.job user model_hr_job group_hr_user 1 1 1 1
11 access_hr_plan_activity_type_employee access_hr_job_employee access_hr_plan_activity_type hr.job.employee model_hr_plan_activity_type model_hr_job base.group_user 1 0 0 0
12 access_hr_plan_employee access_hr_departure_wizard access_hr_plan_employee access.hr.departure.wizard model_hr_plan model_hr_departure_wizard base.group_user group_hr_user 1 0 1 0 1 0
13 access_hr_plan_activity_type_hr_user access_hr_bank_account_allocation_wizard access_hr_plan_activity_type access.hr.bank.account.allocation.wizard model_hr_plan_activity_type model_hr_bank_account_allocation_wizard group_hr_user 1 1 1 1 0
14 access_hr_plan_hr_user access_hr_bank_account_allocation_wizard_line access_hr_plan_hr_user access.hr.bank.account.allocation.wizard.line model_hr_plan model_hr_bank_account_allocation_wizard_line group_hr_user 1 1 1 1
15 access_hr_plan_wizard access_hr_version_wizard access.hr.plan.wizard access.hr.version.wizard model_hr_plan_wizard model_hr_version_wizard hr.group_hr_user group_hr_user 1 1 1 0
access_hr_departure_wizard access.hr.departure.wizard model_hr_departure_wizard hr.group_hr_user 1 1 1 0
16 access_hr_work_location_user access_hr_work_location_user model_hr_work_location base.group_user 1 0 0 0
17 access_hr_work_location_manager access_hr_work_location_manager model_hr_work_location group_hr_manager 1 1 1 1
18 access_hr_departure_reason access_hr_departure_reason_user model_hr_departure_reason group_hr_user 1 1 1 1
19 access_hr_contract_type_manager hr.contract.type.manager model_hr_contract_type hr.group_hr_user group_hr_user 1 1 1 1
20 access_hr_version_manager hr.version.manager model_hr_version group_hr_manager 1 1 1 1
21 access_hr_version_user hr.version.user model_hr_version group_hr_user 1 1 1 1
22 access_mail_activity_plan_hr_manager mail.activity.plan.hr.manager mail.model_mail_activity_plan group_hr_manager 1 1 1 1
23 access_mail_activity_plan_template_hr_manager mail.activity.plan.template.hr.manager mail.model_mail_activity_plan_template group_hr_manager 1 1 1 1
24 access_hr_payroll_structure_type_hr_contract_manager hr.payroll.structure.type.contract.manager model_hr_payroll_structure_type group_hr_manager 1 1 1 1
25 access_hr_resource_manager hr.employee.resource.manager resource.model_resource_resource hr.group_hr_manager 1 1 1 1
26 access_hr_resource_calendar_user hr.employee.resource.calendar.user resource.model_resource_calendar hr.group_hr_user 1 1 1 1
27 access_hr_resource_calendar_attendance_user hr.employee.resource.calendar.attendance.user resource.model_resource_calendar_attendance hr.group_hr_user 1 1 1 1