[FIX] hr_holidays: incorrect count of accrual allocations

Accrual allocations with a due end date should also be taken into
account when computing allocation_display as they are still valid.

closes odoo/odoo#53696

X-original-commit: 04cbd27e35fc32c61c183905dcd1c5f06a3db447
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
This commit is contained in:
alt-odoo
2020-06-25 15:23:16 +00:00
parent a9bf7be269
commit 6162a0fee3
-3
View File
@@ -81,9 +81,6 @@ class HrEmployeeBase(models.AbstractModel):
('employee_id', '=', employee.id),
('holiday_status_id.active', '=', True),
('state', '=', 'validate'),
'|',
('date_to', '=', False),
('date_to', '>=', datetime.date.today()),
])
employee.allocation_count = sum(allocations.mapped('number_of_days'))
employee.allocation_display = "%g" % employee.allocation_count