diff --git a/addons/web_tour/__manifest__.py b/addons/web_tour/__manifest__.py index f7b7da2b959..6e89cf26673 100644 --- a/addons/web_tour/__manifest__.py +++ b/addons/web_tour/__manifest__.py @@ -16,6 +16,9 @@ Odoo Web tours. 'views/tour_templates.xml', 'views/tour_views.xml' ], + 'demo': [ + 'data/web_tour_demo.xml', + ], 'qweb': [ "static/src/xml/*.xml", ], diff --git a/addons/web_tour/data/web_tour_demo.xml b/addons/web_tour/data/web_tour_demo.xml new file mode 100644 index 00000000000..d3a4e5349ae --- /dev/null +++ b/addons/web_tour/data/web_tour_demo.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/addons/web_tour/static/src/js/tour_disable.js b/addons/web_tour/static/src/js/tour_disable.js new file mode 100644 index 00000000000..c90b5ba1127 --- /dev/null +++ b/addons/web_tour/static/src/js/tour_disable.js @@ -0,0 +1,21 @@ +odoo.define('web_tour.DisableTour', function (require) { +"use strict"; + +var TourManager = require('web_tour.TourManager'); + +TourManager.include({ + /** + * Disables tours if Odoo installed with demo data. + * + * @override + */ + _register: function (do_update, tour, name) { + // Consuming tours which are not run by test case + if (!this.running_tour) { + this.consumed_tours.push(name); + } + return this._super.apply(this, arguments); + }, +}); + +});