From 301f002ff054c0ec9e907ffc2301eb81c1486a13 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Thu, 10 Sep 2020 21:14:29 +0000 Subject: [PATCH] [IMP] web_tour: allow theme to override a tour Each theme now will earase the homepage tour with his own tour X-original-commit: 60c4cb82c40e2823daafe8709417e2b8997cef91 --- addons/web_tour/static/src/js/tour_manager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web_tour/static/src/js/tour_manager.js b/addons/web_tour/static/src/js/tour_manager.js index cb7f02dba5d..25a938c3e08 100644 --- a/addons/web_tour/static/src/js/tour_manager.js +++ b/addons/web_tour/static/src/js/tour_manager.js @@ -81,7 +81,7 @@ return core.Class.extend(mixins.EventDispatcherMixin, ServicesMixin, { var options = args.length === 2 ? {} : args[1]; var steps = last_arg instanceof Array ? last_arg : [last_arg]; var tour = { - name: name, + name: options.saveAs || name, steps: steps, url: options.url, rainbowMan: options.rainbowMan === undefined ? true : !!options.rainbowMan, @@ -98,7 +98,7 @@ return core.Class.extend(mixins.EventDispatcherMixin, ServicesMixin, { this._consume_tour(name); }; } - this.tours[name] = tour; + this.tours[tour.name] = tour; }, /** * Returns a promise which is resolved once the tour can be started. This