Skip to content
Snippets Groups Projects
Commit d8dc4cba authored by jvm-odoo's avatar jvm-odoo
Browse files

[FIX] web_tour: fix too much tips on appswitcher


Issue

	- Deactivate demo data
	- Install several modules (e.g. Sales, Helpdesk)
	- Go on Home
	- Hard refresh

	All tours' tips are shown

Cause

	In 02dab5dc, we wait the DOM to be ready.
	The DOM wasn't ready in previous version, this is
	why it seems to work.

	As the DOM is ready, in check_for_tooltip we
	have a visible trigger so trigerred = true
	and the tip is activated.

	If you activate the debug mode, the DOM is
	not ready too, this is why it works fine
	in debug mode.

Solution

	I don't think that not waiting the DOM to be
	ready is good so I think we should keep that
	and handle the case when we update the tours
	from the _register method. So that, we use
	the else part of the update method which
	will break after a tip has been activated.

OPW-2188525

closes odoo/odoo#45073

X-original-commit: 5f0451c5
Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
parent 669bb4ca
No related branches found
No related tags found
No related merge requests found
......@@ -105,7 +105,7 @@ return core.Class.extend(mixins.EventDispatcherMixin, ServicesMixin, {
return self._waitBeforeTourStart().then(function () {
return Promise.all(_.map(self.tours, function (tour, name) {
return self._register(do_update, tour, name);
}));
})).then(() => self.update());
});
},
_register: function (do_update, tour, name) {
......@@ -128,7 +128,6 @@ return core.Class.extend(mixins.EventDispatcherMixin, ServicesMixin, {
if (do_update && (this.running_tour === name || (!this.running_tour && !tour.test && !tour_is_consumed))) {
this._to_next_step(name, 0);
this.update(name);
}
}).bind(this));
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment