[FIX] hr_holidays: inconsistency in leave record rules
- `hr.leave` and `hr.leave.allocation` should have the same record
rules, otherwise leave approval behavior can be unpredictable.
As a Holidays Team Leader:
For example you could see the approve button on a leave but cannot
approve it because the `_check_holidays` fails
closes odoo/odoo#31620
Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
This commit is contained in:
@@ -133,7 +133,7 @@
|
||||
<record id="hr_leave_allocation_rule_team_leader" model="ir.rule">
|
||||
<field name="name">Allocations: Team Leader: read employee's allocations in his team</field>
|
||||
<field name="model_id" ref="model_hr_leave_allocation"/>
|
||||
<field name="domain_force">[('employee_id.leave_manager_id', '=' , user.id)]</field>
|
||||
<field name="domain_force">['|', ('employee_id.leave_manager_id', '=' , user.id), ('employee_id.parent_id.user_id', '=' , user.id)]</field>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_unlink" eval="False"/>
|
||||
|
||||
Reference in New Issue
Block a user