From 6162a0fee38b6776567a0a324783cbdce38f0f43 Mon Sep 17 00:00:00 2001 From: alt-odoo Date: Thu, 25 Jun 2020 10:48:06 +0000 Subject: [PATCH] [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) Signed-off-by: Alex Tuyls --- addons/hr_holidays/models/hr_employee.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/addons/hr_holidays/models/hr_employee.py b/addons/hr_holidays/models/hr_employee.py index 22e9804aa67..b83dda6ddff 100644 --- a/addons/hr_holidays/models/hr_employee.py +++ b/addons/hr_holidays/models/hr_employee.py @@ -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