[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 02dab5dc88, 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: 5f0451c54cb785cc940b78a489316bed5ad9d888
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
@@ -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));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user