[FIX] web_timeline: css and styles not charged when rendering timeline

On library version update a new feature was added at Timeline creation level to
allow modifying the xss. By keeping it active the css classes are not showed

As the view is on backend, has no sense to keep it active. So we deactivate the
feature to allow show the timeline correctly.

TT40299
pull/2429/head
Carlos Roca 2023-03-06 16:42:13 +01:00
parent 7d6ca994b8
commit 7ebcfa1d11
1 changed files with 5 additions and 1 deletions

View File

@ -227,7 +227,11 @@ odoo.define("web_timeline.TimelineRenderer", function (require) {
this.qweb.add_template(tmpl); this.qweb.add_template(tmpl);
} }
this.timeline = new vis.Timeline(this.$timeline.get(0)); this.timeline = new vis.Timeline(
this.$timeline.get(0),
{},
{xss: {disabled: true}}
);
this.timeline.setOptions(this.options); this.timeline.setOptions(this.options);
if (this.mode && this["on_scale_" + this.mode + "_clicked"]) { if (this.mode && this["on_scale_" + this.mode + "_clicked"]) {
this["on_scale_" + this.mode + "_clicked"](); this["on_scale_" + this.mode + "_clicked"]();