From 3a4cb6f59aab5a51310e6124eb117b973e20924e Mon Sep 17 00:00:00 2001 From: mafo-odoo Date: Tue, 31 May 2022 14:26:25 +0000 Subject: [PATCH] [FIX] hr_holidays: right responsible for validation type set Steps to reproduce: - Create a Time off Type for which an allocation can be requested by the employee and with approval "Set by Time Officer" - Set a Time Off approver on the employee - Create an allocation Current behavior: The allocation approval activity is assigned to the employee Expected behavior: The allocation approval activity is assigned to the time off officer Explanation: The first fix commit c2bac984f2de160008b27fb52b1d0ae7abd02abb didn't take into consideration the "Set by Time Officer" approval, we add here this possible value "set" in order to have a complete fix. opw-2849972 closes odoo/odoo#92608 X-original-commit: 7239fad29c4b409097ba2a0d2f92d8b9fa8fd5ca Signed-off-by: Kevin Baptiste Signed-off-by: Fockedey Martin (mafo) --- addons/hr_holidays/models/hr_leave_allocation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_holidays/models/hr_leave_allocation.py b/addons/hr_holidays/models/hr_leave_allocation.py index 9ddc7b258fa..edc72ad073b 100644 --- a/addons/hr_holidays/models/hr_leave_allocation.py +++ b/addons/hr_holidays/models/hr_leave_allocation.py @@ -731,7 +731,7 @@ class HolidaysAllocation(models.Model): self.ensure_one() responsible = self.env.user - if self.validation_type == 'officer': + if self.validation_type == 'officer' or self.validation_type == 'set': if self.holiday_status_id.responsible_id: responsible = self.holiday_status_id.responsible_id