[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 <kba@odoo.com>
This commit is contained in:
Dossogne Bertrand
2022-04-21 13:54:53 +02:00
parent 68ad5504b4
commit b9b2fd8f4e
@@ -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,