From 8f39509d27e95839bdfaaa3573b901796e6c156c Mon Sep 17 00:00:00 2001 From: len-odoo Date: Thu, 8 Nov 2018 07:57:18 +0000 Subject: [PATCH] [FIX] hr_holidays: copy accrual fields when creating child allocations Create an accrual leave, and set it e.g. by employee tag. For each employee having the tag, a child allocation will be created. When doing so, it will prepare the values for these creations. However the relevant fields for accrual leaves were missing from these values. opw 1906476 closes odoo/odoo#28492 --- addons/hr_holidays/models/hr_leave_allocation.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/hr_holidays/models/hr_leave_allocation.py b/addons/hr_holidays/models/hr_leave_allocation.py index dae7d26d262..a6081d2d566 100644 --- a/addons/hr_holidays/models/hr_leave_allocation.py +++ b/addons/hr_holidays/models/hr_leave_allocation.py @@ -374,6 +374,11 @@ class HolidaysAllocation(models.Model): 'parent_id': self.id, 'employee_id': employee.id, 'accrual': self.accrual, + 'date_to': self.date_to, + 'interval_unit': self.interval_unit, + 'interval_number': self.interval_number, + 'number_per_interval': self.number_per_interval, + 'unit_per_interval': self.unit_per_interval, } return values