From fe9eac933acec52328496a495d7a9fcd5086fadf Mon Sep 17 00:00:00 2001 From: Dossogne Bertrand Date: Fri, 16 Feb 2024 13:48:31 +0100 Subject: [PATCH] [FIX] hr_holidays: correct default date_to from calendar Before this commit, highlighting several days from the calendar view in Time Off would still take the first day selected as the default date_to. The expected behaviour is that it should be the last day highlighted instead. closes odoo/odoo#154469 X-original-commit: fcd2b141a337913e376f7ce0d2b313b68d97d6cc Signed-off-by: Sofie Gvaladze (sgv) Signed-off-by: Bertrand Dossogne (bedo) --- addons/hr_holidays/static/src/views/calendar/calendar_model.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_holidays/static/src/views/calendar/calendar_model.js b/addons/hr_holidays/static/src/views/calendar/calendar_model.js index 7c899d62be3..17cc0b89a0c 100644 --- a/addons/hr_holidays/static/src/views/calendar/calendar_model.js +++ b/addons/hr_holidays/static/src/views/calendar/calendar_model.js @@ -38,7 +38,7 @@ export class TimeOffCalendarModel extends CalendarModel { } if ("default_date_to" in context) { context["default_date_to"] = serializeDateTime( - deserializeDateTime(context["default_date_from"]).set({ hours: 19 }) + deserializeDateTime(context["default_date_to"]).set({ hours: 19 }) ); } return context;