From b9b2fd8f4eaa0186b26d232be37d489140d7199c Mon Sep 17 00:00:00 2001 From: Dossogne Bertrand Date: Thu, 21 Apr 2022 07:48:45 +0000 Subject: [PATCH] [FIX] hr_holidays: fix new time off error This commit aims to fix an error created in task 2658415 which prevent to create a new time off. taskID 2829472 closes odoo/odoo#89221 Signed-off-by: Kevin Baptiste --- .../src/js/time_off_calendar/time_off_calendar_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_holidays/static/src/js/time_off_calendar/time_off_calendar_controller.js b/addons/hr_holidays/static/src/js/time_off_calendar/time_off_calendar_controller.js index 9461130445b..7e815f8114b 100644 --- a/addons/hr_holidays/static/src/js/time_off_calendar/time_off_calendar_controller.js +++ b/addons/hr_holidays/static/src/js/time_off_calendar/time_off_calendar_controller.js @@ -187,6 +187,7 @@ export const TimeOffCalendarController = CalendarController.extend({ if (this.mode === "day") { date_from = this.model.data.start_date; } + let date_to = moment(date_from); date_from = date_from.set({ 'hour': 0, 'minute': 0, @@ -194,7 +195,6 @@ export const TimeOffCalendarController = CalendarController.extend({ }); date_from.subtract(this.getSession().getTZOffset(date_from), 'minutes'); date_from = date_from.locale('en').format('YYYY-MM-DD HH:mm:ss'); - let date_to = date_from; date_to = date_to.set({ 'hour': 23, 'minute': 59,