[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 <kba@odoo.com>
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
This commit is contained in:
mafo-odoo
2022-06-01 12:14:13 +02:00
parent 7ddcf5d5b1
commit 3a4cb6f59a
@@ -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