diff options
| author | Jorge Pinna Puissant <jpp@odoo.com> | 2019-11-12 14:33:06 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-11-14 15:09:13 +0000 |
| commit | aefae068a61b51c1eac6cb7dd4ac9b48ab8b3fdd (patch) | |
| tree | 6c981c2dcd953079aed4e6bd738f32baa8df45ec /addons/web/static/src | |
| parent | a5702a1ff1e60add4401c9cf0b3636a8f3e4c04c (diff) | |
[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>
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/views/calendar/calendar_model.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/addons/web/static/src/js/views/calendar/calendar_model.js b/addons/web/static/src/js/views/calendar/calendar_model.js index 82832bc043c..dc27ff1bfdb 100644 --- a/addons/web/static/src/js/views/calendar/calendar_model.js +++ b/addons/web/static/src/js/views/calendar/calendar_model.js @@ -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; |
