Skip to content

Commit

Permalink
[FIX] hr_payroll: Make payroll groups imply holiday groups
Browse files Browse the repository at this point in the history
Purpose
=======

Currently, groups `hr_holidays.group_hr_holidays_[user|manager]`
and `hr_payroll.group_hr_payroll_[user|manager]` are independant.

A member of payroll groups is not able to approve/refuse a leave.

This is a problem as they should be able to approve/refuse leaves before generating payslips.
This is the  point of `hr.benefits`: a global way of managing
attendances and leaves before generating payslips.

Specification
=============

Payroll groups should imply the corresponding
holiday group.

1. User
`hr_payroll.group_hr_payroll_user`
implies
`hr_holidays.group_hr_holidays_user`

2. Manager
`hr_payroll.group_hr_payroll_manager`
implies
`hr_holidays.group_hr_holidays_manager`
  • Loading branch information
LucasLefevre authored and tivisse committed Mar 19, 2019
1 parent ca5b1a8 commit a9f97a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/hr_payroll/security/hr_payroll_security.xml
Expand Up @@ -10,13 +10,13 @@
<record id="group_hr_payroll_user" model="res.groups">
<field name="name">Officer</field>
<field name="category_id" ref="base.module_category_human_resources_payroll"/>
<field name="implied_ids" eval="[(4, ref('hr.group_hr_user')), (4, ref('hr_contract.group_hr_contract_manager'))]"/>
<field name="implied_ids" eval="[(4, ref('hr.group_hr_user')), (4, ref('hr_contract.group_hr_contract_manager')), (4, ref('hr_holidays.group_hr_holidays_user'))]"/>
</record>

<record id="group_hr_payroll_manager" model="res.groups">
<field name="name">Administrator</field>
<field name="category_id" ref="base.module_category_human_resources_payroll"/>
<field name="implied_ids" eval="[(4, ref('hr_payroll.group_hr_payroll_user'))]"/>
<field name="implied_ids" eval="[(4, ref('hr_payroll.group_hr_payroll_user')), (4, ref('hr_holidays.group_hr_holidays_manager'))]"/>
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
</record>

Expand Down

0 comments on commit a9f97a2

Please sign in to comment.