[FIX] web: hours in event detail

In a view month of calendar, when seen the details of a non-all day
event.

Before this commit, the end hour was always 00h00m.
Now, the end hour is the encoded one.

opw-2093111

closes odoo/odoo#40287

X-original-commit: 92fe5f11c16ee6749c4b0834ec12e5e858b1748d
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
This commit is contained in:
Jorge Pinna Puissant
2019-11-14 15:09:13 +00:00
committed by fw-bot
co-authored by Nicolas Lempereur
parent a5702a1ff1
commit aefae068a6
@@ -715,13 +715,12 @@ return AbstractModel.extend({
} else if (this.data.scale === 'month' && this.fields[this.mapping.date_start].type !== 'date') {
// In month, FullCalendar gives the end day as the
// next day at midnight (instead of 23h59).
date_stop.add(1, 'days');
r.end = date_stop.clone().add(1, 'days').startOf('day').format('YYYY-MM-DD');
r.start = date_start.clone().format('YYYY-MM-DD');
// allow to resize in month mode
r.reset_allday = r.allDay;
r.allDay = true;
r.start = date_start.format('YYYY-MM-DD');
r.end = date_stop.startOf('day').format('YYYY-MM-DD');
}
return r;