From 5cb4d75892bf619eed8ed8058ad79c909dbd3789 Mon Sep 17 00:00:00 2001 From: jguenat Date: Wed, 14 Sep 2022 19:39:08 +0200 Subject: [PATCH] [FIX] web_timeline: utc and create_completed fix wrong time used when creating new record on record creation timeline view was reloaded and all items disappeared fix by removing unnecessary reload --- web_timeline/static/src/js/timeline_controller.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/web_timeline/static/src/js/timeline_controller.js b/web_timeline/static/src/js/timeline_controller.js index dcf266aac..b147aff7a 100644 --- a/web_timeline/static/src/js/timeline_controller.js +++ b/web_timeline/static/src/js/timeline_controller.js @@ -270,12 +270,12 @@ odoo.define("web_timeline.TimelineController", function (require) { } if (this.date_start) { default_context["default_".concat(this.date_start)] = moment(item.start) - .add(1, "hours") + .utc() .format("YYYY-MM-DD HH:mm:ss"); } if (this.date_stop && item.end) { default_context["default_".concat(this.date_stop)] = moment(item.end) - .add(1, "hours") + .utc() .format("YYYY-MM-DD HH:mm:ss"); } if (item.group > 0) { @@ -317,8 +317,6 @@ odoo.define("web_timeline.TimelineController", function (require) { var new_event = this.renderer.event_data_transform(records[0]); var items = this.renderer.timeline.itemsData; items.add(new_event); - this.renderer.timeline.setItems(items); - this.reload(); }); },