diff options
| author | Julien Mougenot <jum@odoo.com> | 2019-11-26 15:24:40 +0000 |
|---|---|---|
| committer | Julien Mougenot <jum@odoo.com> | 2019-11-29 09:05:58 +0000 |
| commit | 9d9dc29c3a6bf14a56ed7029d7dfcc43783e9ce5 (patch) | |
| tree | 4f55602bf21b3cd7692e69673c03b3791c9bc8e7 /addons/web/static/src | |
| parent | 22df074e7b1bd68069f6959cd56fb9316f289e7d (diff) | |
[REF] web: revert 13.0-opw-2093111-calendar_fixex-jpp
Most of the diff changes don't seem to affect the issue, and
there is no test to prove that it has been actually fixed.
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/views/calendar/calendar_model.js | 10 |
1 files changed, 5 insertions, 5 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 a12f8f0469d..bf2b8884dfb 100644 --- a/addons/web/static/src/js/views/calendar/calendar_model.js +++ b/addons/web/static/src/js/views/calendar/calendar_model.js @@ -65,11 +65,10 @@ return AbstractModel.extend({ } var isDateEvent = this.fields[this.mapping.date_start].type === 'date'; - var keepRecordTime = !this.mapping.all_day || (this.data.scale === 'month' && event.record && !event.record[this.mapping.all_day]); // An "allDay" event without the "all_day" option is not considered // as a 24h day. It's just a part of the day (by default: 7h-19h). if (event.allDay) { - if (keepRecordTime && !isDateEvent) { + if (!this.mapping.all_day && !isDateEvent) { if (event.r_start) { start.hours(event.r_start.hours()) .minutes(event.r_start.minutes()) @@ -95,7 +94,7 @@ return AbstractModel.extend({ if (this.mapping.all_day) { if (event.record) { data[this.mapping.all_day] = - (this.data.scale !== 'month' && event.allDay) || + (this.scale !== 'month' && event.allDay) || event.record[this.mapping.all_day] && end.diff(start) < 10 || false; @@ -722,12 +721,13 @@ 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). - r.end = date_stop.clone().add(1, 'days').startOf('day').format('YYYY-MM-DD'); - r.start = date_start.clone().format('YYYY-MM-DD'); + date_stop.add(1, 'days'); // 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; |
