Initial commit: Hr packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:50 +02:00
commit 62531cd146
2820 changed files with 1432848 additions and 0 deletions

View file

@ -0,0 +1,298 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record model="ir.module.category" id="base.module_category_human_resources_time_off">
<field name="description">A user without any rights on Time Off will be able to see the application, create his own holidays and manage the requests of the users he's manager of.</field>
<field name="sequence">10</field>
</record>
<record id="group_hr_holidays_responsible" model="res.groups">
<field name="name">Time Off Responsible</field>
<field name="category_id" ref="base.module_category_hidden"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
</record>
<record id="group_hr_holidays_user" model="res.groups">
<field name="name">Officer : Manage all requests</field>
<field name="category_id" ref="base.module_category_human_resources_time_off"/>
<field name="implied_ids" eval="[(4, ref('hr_holidays.group_hr_holidays_responsible'))]"/>
</record>
<record id="group_hr_holidays_manager" model="res.groups">
<field name="name">Administrator</field>
<field name="category_id" ref="base.module_category_human_resources_time_off"/>
<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'))]"/>
</record>
<data noupdate="1">
<record id="base.default_user" model="res.users">
<field name="groups_id" eval="[(4,ref('hr_holidays.group_hr_holidays_manager'))]"/>
</record>
<record id="hr_leave_rule_employee" model="ir.rule">
<field name="name">Time Off base.group_user read</field>
<field name="model_id" ref="model_hr_leave"/>
<field name="domain_force">[('employee_id.user_id', '=', user.id)]</field>
<field name="perm_create" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>
<record id="hr_leave_rule_employee_update" model="ir.rule">
<field name="name">Time Off base.group_user create/write</field>
<field name="model_id" ref="model_hr_leave"/>
<field name="domain_force">[
('holiday_type', '=', 'employee'),
'|',
'&amp;',
('employee_id.user_id', '=', user.id),
('state', 'not in', ['validate', 'validate1']),
'&amp;',
('validation_type', 'in', ['manager', 'both', 'no_validation']),
('employee_id.leave_manager_id', '=', user.id),
]</field>
<field name="perm_read" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>
<record id="hr_leave_rule_employee_unlink" model="ir.rule">
<field name="name">Time Off base.group_user unlink</field>
<field name="model_id" ref="model_hr_leave"/>
<field name="domain_force">[('employee_id.user_id', '=', user.id), ('state', 'in', ['draft', 'confirm'])]</field>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="True"/>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
</record>
<record id="hr_leave_rule_responsible_read" model="ir.rule">
<field name="name">Time Off Responsible read</field>
<field name="model_id" ref="model_hr_leave"/>
<field name="domain_force">[
('employee_id.leave_manager_id', '=', user.id),
]</field>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="groups" eval="[(4, ref('hr_holidays.group_hr_holidays_responsible'))]"/>
</record>
<record id="hr_leave_rule_responsible_update" model="ir.rule">
<field name="name">Time Off Responsible create/write</field>
<field name="model_id" ref="model_hr_leave"/>
<field name="domain_force">[
('holiday_type', '=', 'employee'),
'|',
'&amp;',
('employee_id.user_id', '=', user.id),
('state', '!=', 'validate'),
('employee_id.leave_manager_id', '=', user.id),
]</field>
<field name="perm_read" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="groups" eval="[(4, ref('hr_holidays.group_hr_holidays_responsible'))]"/>
</record>
<record id="hr_leave_rule_user_read" model="ir.rule">
<field name="name">Time Off All Approver read</field>
<field name="model_id" ref="model_hr_leave"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_unlink" eval="True"/>
<field name="groups" eval="[(4, ref('hr_holidays.group_hr_holidays_user'))]"/>
</record>
<record id="hr_leave_rule_officer_update" model="ir.rule">
<field name="name">Time Off All Approver create/write</field>
<field name="model_id" ref="model_hr_leave"/>
<field name="domain_force">[
('holiday_type', '=', 'employee'),
'|',
'&amp;',
('employee_id.user_id', '=', user.id),
('state', '!=', 'validate'),
'|',
('employee_id.user_id', '!=', user.id),
('employee_id.user_id', '=', False)
]</field>
<field name="perm_read" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="groups" eval="[(4, ref('hr_holidays.group_hr_holidays_user'))]"/>
</record>
<record id="hr_leave_rule_manager" model="ir.rule">
<field name="name">Time Off Administrator</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">Time Off: multi company global rule</field>
<field name="model_id" ref="model_hr_leave"/>
<field name="domain_force">[
'|',
('employee_id', '=', False),
('employee_id.company_id', 'in', company_ids),
'|',
('holiday_status_id', '=', False),
('holiday_status_id.company_id', 'in', company_ids + [False]),
]</field>
</record>
<record id="hr_leave_allocation_rule_multicompany" model="ir.rule">
<field name="name">Leave Allocations: multi company global rule</field>
<field name="model_id" ref="model_hr_leave_allocation"/>
<field name="domain_force">[
'|',
('employee_id', '=', False),
('employee_id.company_id', 'in', company_ids),
('holiday_status_id.company_id', 'in', company_ids + [False])
]</field>
</record>
<record id="hr_leave_allocation_rule_employee" model="ir.rule">
<field name="name">Allocations: employee: read own</field>
<field name="model_id" ref="model_hr_leave_allocation"/>
<field name="domain_force">[
'|',
('employee_id.leave_manager_id', '=', user.id),
('employee_id.user_id', '=', user.id),
]</field>
<field name="perm_create" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>
<record id="hr_leave_allocation_rule_employee_update" model="ir.rule">
<field name="name">Allocations: base.group_user create/write</field>
<field name="model_id" ref="model_hr_leave_allocation"/>
<field name="domain_force">[
('holiday_status_id.requires_allocation', '=', 'yes'),
('holiday_status_id.employee_requests', '=', 'yes'),
('holiday_type', '=', 'employee'),
'|',
('employee_id.user_id', '=', user.id),
'&amp;',
('validation_type', '=', 'officer'),
('employee_id.leave_manager_id', '=', user.id),
]</field>
<field name="perm_read" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>
<record id="hr_leave_allocation_rule_officer_read" model="ir.rule">
<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"/>
<field name="perm_write" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="groups" eval="[(4, ref('hr_holidays.group_hr_holidays_user'))]"/>
</record>
<record id="hr_leav_allocation_rule_employee_unlink" model="ir.rule">
<field name="name">Allocations base.group_user unlink</field>
<field name="model_id" ref="model_hr_leave_allocation"/>
<field name="domain_force">[('employee_id.user_id', '=', user.id), ('state', '=', 'draft')]</field>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
</record>
<record id="hr_leave_allocation_rule_officer_update" model="ir.rule">
<field name="name">Allocations: holiday user : create/write</field>
<field name="model_id" ref="model_hr_leave_allocation"/>
<field name="domain_force">[
('holiday_type', '=', 'employee'),
'|',
'&amp;',
('employee_id.user_id', '=', user.id),
('state', '!=', 'validate'),
'|',
('employee_id.user_id', '!=', user.id),
('employee_id.user_id', '=', False)
]</field>
<field name="groups" eval="[(4,ref('hr_holidays.group_hr_holidays_user'))]"/>
</record>
<record id="hr_leave_allocation_rule_manager" model="ir.rule">
<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_base_user" model="ir.rule">
<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="perm_create" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
</record>
<!-- FIXME RLi Maybe this should be restricted somewhat -->
<record id="resource_leaves_holidays_user" model="ir.rule">
<field name="name">Time Off Resources: All 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_user'))]"/>
</record>
<record id="hr_holidays_status_rule_multi_company" model="ir.rule">
<field name="name">Time Off multi company rule</field>
<field name="model_id" ref="model_hr_leave_type"/>
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
</record>
<record id="hr_leave_stress_day_rule_multi_company" model="ir.rule">
<field name="name">Stress Day: multi company rule</field>
<field name="model_id" ref="model_hr_leave_stress_day"/>
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
</record>
<record id="hr_leave_report_calendar_rule_multi_company" model="ir.rule">
<field name="name">Time Off Report Calendar: multi company global rule</field>
<field name="model_id" ref="model_hr_leave_report_calendar"/>
<field name="global" eval="True"/>
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
</record>
<record id="hr_leave_report_rule_multi_company" model="ir.rule">
<field name="name">Time Off Report: multi company global rule</field>
<field name="model_id" ref="model_hr_leave_report"/>
<field name="domain_force">[('company_id', 'in', company_ids + [False])]</field>
</record>
<record id="hr_leave_report_rule_group_user" model="ir.rule">
<field name="name">Time Off Summary / Report: Internal User</field>
<field name="model_id" ref="model_hr_leave_report"/>
<field name="domain_force">[('employee_id.user_id', '=', user.id)]</field>
<field name="perm_create" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
</record>
<record id="hr_leave_report_rule_group_holiday_user" model="ir.rule">
<field name="name">Time Off Summary / Report: All Approver</field>
<field name="model_id" ref="model_hr_leave_report"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="perm_create" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_unlink" eval="False"/>
<field name="groups" eval="[(4, ref('hr_holidays.group_hr_holidays_user'))]"/>
</record>
</data>
</odoo>

View file

@ -0,0 +1,26 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_hr_holidays_manager_request,hr.holidays.manager.request,model_hr_leave,hr_holidays.group_hr_holidays_manager,1,1,1,1
access_hr_holidays_user_request,hr.holidays.user.request,model_hr_leave,hr_holidays.group_hr_holidays_user,1,1,1,1
access_hr_holidays_employee_request,hr.holidays.employee.request,model_hr_leave,base.group_user,1,1,1,1
access_hr_holidays_manager_allocation,hr.holidays.manager.allocation,model_hr_leave_allocation,hr_holidays.group_hr_holidays_manager,1,1,1,1
access_hr_holidays_user_allocation,hr.holidays.user.allocation,model_hr_leave_allocation,hr_holidays.group_hr_holidays_user,1,1,1,1
access_hr_holidays_employee_allocation,hr.holidays.employee.allocation,model_hr_leave_allocation,base.group_user,1,1,1,1
access_hr_holidays_status_manager,hr.holidays.status manager,model_hr_leave_type,hr_holidays.group_hr_holidays_manager,1,1,1,1
access_hr_holidays_status_user,hr.holidays.status user,model_hr_leave_type,hr_holidays.group_hr_holidays_user,1,0,0,0
access_hr_holidays_status_employee,hr.holidays.status employee,model_hr_leave_type,base.group_user,1,0,0,0
access_hr_leave_report,access_hr_leave_report,model_hr_leave_report,base.group_user,1,0,0,0
access_resource_calendar_leaves_user,resource_calendar_leaves_user,resource.model_resource_calendar_leaves,hr_holidays.group_hr_holidays_user,1,1,1,1
access_calendar_event_hr_user,calendar.event.hr.user,calendar.model_calendar_event,hr_holidays.group_hr_holidays_user,1,1,1,1
access_calendar_event_type_manager,calendar.event.type.manager,calendar.model_calendar_event_type,hr_holidays.group_hr_holidays_manager,1,1,1,1
access_calendar_attendee_hr_user,calendar.attendee.hr.user,calendar.model_calendar_attendee,hr_holidays.group_hr_holidays_user,1,1,1,1
access_mail_activity_type_holidays_manager,mail.activity.type.holidays.manager,mail.model_mail_activity_type,hr_holidays.group_hr_holidays_manager,1,1,1,1
access_hr_holidays_summary_employee,access.hr.holidays.summary.employee,model_hr_holidays_summary_employee,hr_holidays.group_hr_holidays_user,1,1,1,0
access_hr_leave_report_calendar,access_hr_leave_report_calendar,model_hr_leave_report_calendar,base.group_user,1,0,0,0
access_hr_leave_employee_type_report,access_hr_leave_employee_type_report,model_hr_leave_employee_type_report,base.group_user,1,0,0,0
access_hr_leave_accrual_plan_user,hr.leave.accrual.plan.user,model_hr_leave_accrual_plan,hr_holidays.group_hr_holidays_user,1,0,0,0
access_hr_leave_accrual_level_user,hr.leave.accrual.level.user,model_hr_leave_accrual_level,hr_holidays.group_hr_holidays_user,1,0,0,0
access_hr_leave_accrual_plan_manager,hr.leave.accrual.plan.manager,model_hr_leave_accrual_plan,hr_holidays.group_hr_holidays_manager,1,1,1,1
access_hr_leave_accrual_level_manager,hr.leave.accrual.level.manager,model_hr_leave_accrual_level,hr_holidays.group_hr_holidays_manager,1,1,1,1
access_hr_holidays_cancel_leave,access_hr_holidays_cancel_leave,hr_holidays.model_hr_holidays_cancel_leave,base.group_user,1,1,1,1
access_hr_leave_stress_day_user,access_hr_holidays_stress_day_user,hr_holidays.model_hr_leave_stress_day,base.group_user,1,0,0,0
access_hr_leave_stress_day_manager,access_hr_holidays_stress_day_manager,hr_holidays.model_hr_leave_stress_day,hr_holidays.group_hr_holidays_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_hr_holidays_manager_request hr.holidays.manager.request model_hr_leave hr_holidays.group_hr_holidays_manager 1 1 1 1
3 access_hr_holidays_user_request hr.holidays.user.request model_hr_leave hr_holidays.group_hr_holidays_user 1 1 1 1
4 access_hr_holidays_employee_request hr.holidays.employee.request model_hr_leave base.group_user 1 1 1 1
5 access_hr_holidays_manager_allocation hr.holidays.manager.allocation model_hr_leave_allocation hr_holidays.group_hr_holidays_manager 1 1 1 1
6 access_hr_holidays_user_allocation hr.holidays.user.allocation model_hr_leave_allocation hr_holidays.group_hr_holidays_user 1 1 1 1
7 access_hr_holidays_employee_allocation hr.holidays.employee.allocation model_hr_leave_allocation base.group_user 1 1 1 1
8 access_hr_holidays_status_manager hr.holidays.status manager model_hr_leave_type hr_holidays.group_hr_holidays_manager 1 1 1 1
9 access_hr_holidays_status_user hr.holidays.status user model_hr_leave_type hr_holidays.group_hr_holidays_user 1 0 0 0
10 access_hr_holidays_status_employee hr.holidays.status employee model_hr_leave_type base.group_user 1 0 0 0
11 access_hr_leave_report access_hr_leave_report model_hr_leave_report base.group_user 1 0 0 0
12 access_resource_calendar_leaves_user resource_calendar_leaves_user resource.model_resource_calendar_leaves hr_holidays.group_hr_holidays_user 1 1 1 1
13 access_calendar_event_hr_user calendar.event.hr.user calendar.model_calendar_event hr_holidays.group_hr_holidays_user 1 1 1 1
14 access_calendar_event_type_manager calendar.event.type.manager calendar.model_calendar_event_type hr_holidays.group_hr_holidays_manager 1 1 1 1
15 access_calendar_attendee_hr_user calendar.attendee.hr.user calendar.model_calendar_attendee hr_holidays.group_hr_holidays_user 1 1 1 1
16 access_mail_activity_type_holidays_manager mail.activity.type.holidays.manager mail.model_mail_activity_type hr_holidays.group_hr_holidays_manager 1 1 1 1
17 access_hr_holidays_summary_employee access.hr.holidays.summary.employee model_hr_holidays_summary_employee hr_holidays.group_hr_holidays_user 1 1 1 0
18 access_hr_leave_report_calendar access_hr_leave_report_calendar model_hr_leave_report_calendar base.group_user 1 0 0 0
19 access_hr_leave_employee_type_report access_hr_leave_employee_type_report model_hr_leave_employee_type_report base.group_user 1 0 0 0
20 access_hr_leave_accrual_plan_user hr.leave.accrual.plan.user model_hr_leave_accrual_plan hr_holidays.group_hr_holidays_user 1 0 0 0
21 access_hr_leave_accrual_level_user hr.leave.accrual.level.user model_hr_leave_accrual_level hr_holidays.group_hr_holidays_user 1 0 0 0
22 access_hr_leave_accrual_plan_manager hr.leave.accrual.plan.manager model_hr_leave_accrual_plan hr_holidays.group_hr_holidays_manager 1 1 1 1
23 access_hr_leave_accrual_level_manager hr.leave.accrual.level.manager model_hr_leave_accrual_level hr_holidays.group_hr_holidays_manager 1 1 1 1
24 access_hr_holidays_cancel_leave access_hr_holidays_cancel_leave hr_holidays.model_hr_holidays_cancel_leave base.group_user 1 1 1 1
25 access_hr_leave_stress_day_user access_hr_holidays_stress_day_user hr_holidays.model_hr_leave_stress_day base.group_user 1 0 0 0
26 access_hr_leave_stress_day_manager access_hr_holidays_stress_day_manager hr_holidays.model_hr_leave_stress_day hr_holidays.group_hr_holidays_manager 1 1 1 1