diff --git a/addons/web_tour/__manifest__.py b/addons/web_tour/__manifest__.py index 80f44db9165..5ff9710e855 100644 --- a/addons/web_tour/__manifest__.py +++ b/addons/web_tour/__manifest__.py @@ -21,7 +21,7 @@ Odoo Web tours. 'data/web_tour_demo.xml', ], 'qweb': [ - "static/src/xml/*.xml", + "static/src/xml/debug_manager.xml", ], 'auto_install': True } diff --git a/addons/web_tour/static/src/js/tip.js b/addons/web_tour/static/src/js/tip.js index 971af4e7c7f..8b3a8d04566 100644 --- a/addons/web_tour/static/src/js/tip.js +++ b/addons/web_tour/static/src/js/tip.js @@ -8,6 +8,7 @@ var _t = core._t; var Tip = Widget.extend({ template: "Tip", + xmlDependencies: ['/web_tour/static/src/xml/tip.xml'], events: { click: '_onTipClicked', mouseenter: "_to_info_mode", diff --git a/addons/web_tour/static/src/js/tour_service.js b/addons/web_tour/static/src/js/tour_service.js index 75e2b4daa8d..b0507d22e43 100644 --- a/addons/web_tour/static/src/js/tour_service.js +++ b/addons/web_tour/static/src/js/tour_service.js @@ -61,12 +61,8 @@ return session.is_bound.then(function () { }, 500); var observer = new MutationObserver(check_tooltip); var start_service = (function () { - var load_def; return function (observe) { - if (load_def === undefined && observe && session.is_frontend) { - load_def = ajax.loadXML('/web_tour/static/src/xml/tip.xml', QWeb); - } var def = $.Deferred(); $(function () { @@ -74,18 +70,16 @@ return session.is_bound.then(function () { * Once the DOM is ready, we still have to wait all the modules are loaded before completing the tours * registration and starting listening for DOM mutations. */ - $.when(load_def).then(function () { - _.defer(function () { - tour_manager._register_all(observe); - if (observe) { - observer.observe(document.body, { - attributes: true, - childList: true, - subtree: true, - }); - } - def.resolve(); - }); + _.defer(function () { + tour_manager._register_all(observe); + if (observe) { + observer.observe(document.body, { + attributes: true, + childList: true, + subtree: true, + }); + } + def.resolve(); }); }); return def;