From 0a3bd7f41442d51b0d81c0db952f8561ae662bbc Mon Sep 17 00:00:00 2001 From: William Braeckman Date: Fri, 3 Sep 2021 10:26:19 +0000 Subject: [PATCH] [FIX] hr_holidays: fix action_with_unused_accruals visual Fixes the above mentioned field in the hierarchical kanban view in the accrual plan form view. TaskId-2637152 closes odoo/odoo#75923 Related: odoo/upgrade#2802 Signed-off-by: Kevin Baptiste --- addons/hr_holidays/models/hr_leave_accrual_plan_level.py | 2 +- addons/hr_holidays/views/hr_leave_accrual_views.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/hr_holidays/models/hr_leave_accrual_plan_level.py b/addons/hr_holidays/models/hr_leave_accrual_plan_level.py index 21c74da8325..ebeb3201b2f 100644 --- a/addons/hr_holidays/models/hr_leave_accrual_plan_level.py +++ b/addons/hr_holidays/models/hr_leave_accrual_plan_level.py @@ -20,7 +20,7 @@ def _get_date_check_month(year, month, day): """ month_range = calendar.monthrange(year, month) if day > month_range[1]: - return datetime.date(year, month, min(day, month_range[1])) + relativedelta(days=(day - month_range[1])) + return datetime.date(year, month, month_range[1]) + relativedelta(days=(day - month_range[1])) return datetime.date(year, month, day) class AccrualPlanLevel(models.Model): diff --git a/addons/hr_holidays/views/hr_leave_accrual_views.xml b/addons/hr_holidays/views/hr_leave_accrual_views.xml index d1e8314b6fa..546a9ef2a2b 100644 --- a/addons/hr_holidays/views/hr_leave_accrual_views.xml +++ b/addons/hr_holidays/views/hr_leave_accrual_views.xml @@ -160,8 +160,8 @@
Limit of
-
- At the end of the year, unused accruals will be postponedlost +
+ At the end of the year, unused accruals will be postponedlost