From a3e6b5caaeea33f6719b4b320f141f14ce5c0e15 Mon Sep 17 00:00:00 2001 From: "Thomas Lefebvre (thle)" Date: Thu, 26 Jan 2023 08:53:05 +0000 Subject: [PATCH] [FIX] hr_holidays: use the language format to display dates Steps to reproduce: - go to Time Off app. Issue: Dates in the dashboard do not respect the language format. Cause: We give a date format to the `format_date` function. This function applies this format and not the language format. opw-3138369 closes odoo/odoo#111130 X-original-commit: 432f146884d0a8b302b8f322f775087da027152b Signed-off-by: Kevin Baptiste Signed-off-by: Lefebvre Thomas (thle) --- addons/hr_holidays/models/hr_leave_type.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_holidays/models/hr_leave_type.py b/addons/hr_holidays/models/hr_leave_type.py index 676e5a7503a..c764b8a6a0e 100644 --- a/addons/hr_holidays/models/hr_leave_type.py +++ b/addons/hr_holidays/models/hr_leave_type.py @@ -442,7 +442,7 @@ class HolidaysType(models.Model): 'leaves_requested': ('%.2f' % (self.max_leaves - self.virtual_remaining_leaves - self.leaves_taken)).rstrip('0').rstrip('.'), 'leaves_approved': ('%.2f' % self.leaves_taken).rstrip('0').rstrip('.'), 'closest_allocation_remaining': ('%.2f' % closest_allocation_remaining).rstrip('0').rstrip('.'), - 'closest_allocation_expire': format_date(self.env, self.closest_allocation_to_expire.date_to, date_format="MM/dd/yyyy") if self.closest_allocation_to_expire.date_to else False, + 'closest_allocation_expire': format_date(self.env, self.closest_allocation_to_expire.date_to) if self.closest_allocation_to_expire.date_to else False, 'request_unit': self.request_unit, 'icon': self.sudo().icon_id.url, }, self.requires_allocation, self.id)