From e671d055256c614b6166593251ee03f69a844a5f Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Wed, 24 Aug 2016 15:18:58 +0200 Subject: [PATCH] [FIX] web_tour: log killing tour message as an error Instead of logging "Killing tour x" when calling the run method a second time and then logging "ok" when consuming the old running tour, the message "Killing tour x" is now logged as an error for phamtomJS. Also, let "x" be the tour which is killed and not the one which wanted to be runned. --- addons/web_tour/static/src/js/tour_manager.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/web_tour/static/src/js/tour_manager.js b/addons/web_tour/static/src/js/tour_manager.js index 046510afb1a..4a055459164 100644 --- a/addons/web_tour/static/src/js/tour_manager.js +++ b/addons/web_tour/static/src/js/tour_manager.js @@ -143,9 +143,8 @@ return core.Class.extend({ }, run: function (tour_name, step_delay) { if (this.running_tour) { - console.warn(_.str.sprintf("Killing tour %s", tour_name)); - this._deactivate_tip(this.active_tooltips[tour_name]); - this._consume_tour(tour_name); + this._deactivate_tip(this.active_tooltips[this.running_tour]); + this._consume_tour(this.running_tour, _.str.sprintf("Killing tour %s", this.running_tour)); return; } var tour = this.tours[tour_name];