From e4c434c6ff00af85ba10de5cef2c99a56afb82c4 Mon Sep 17 00:00:00 2001 From: Toufik Ben Jaa Date: Wed, 6 Mar 2019 09:03:28 +0000 Subject: [PATCH] [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) --- addons/hr_holidays/security/hr_holidays_security.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_holidays/security/hr_holidays_security.xml b/addons/hr_holidays/security/hr_holidays_security.xml index 015dea9c712..906188439e2 100644 --- a/addons/hr_holidays/security/hr_holidays_security.xml +++ b/addons/hr_holidays/security/hr_holidays_security.xml @@ -133,7 +133,7 @@ Allocations: Team Leader: read employee's allocations in his team - [('employee_id.leave_manager_id', '=' , user.id)] + ['|', ('employee_id.leave_manager_id', '=' , user.id), ('employee_id.parent_id.user_id', '=' , user.id)]