[FIX] hr_holidays: Fix smart-button display of remaining time off
This PR fixes the display of remaining days that wasn't correctly displayed when an allocation had no time limit. task-3414291 closes odoo/odoo#134584 X-original-commit: 5fc84bd71fca69862ef4eb3fbb956a18c951d8d0 Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com> Signed-off-by: Jurgen Gjini (jugj) <jugj@odoo.com>
This commit is contained in:
@@ -89,6 +89,8 @@ class HrEmployeeBase(models.AbstractModel):
|
||||
('holiday_status_id.requires_allocation', '=', 'yes'),
|
||||
('state', '=', 'validate'),
|
||||
('date_from', '<=', current_date),
|
||||
'|',
|
||||
('date_to', '=', False),
|
||||
('date_to', '>=', current_date),
|
||||
], ['employee_id'], ['__count', 'number_of_days:sum'])
|
||||
rg_results = {employee.id: (count, days) for employee, count, days in data}
|
||||
|
||||
Reference in New Issue
Block a user