diff options
| author | Géry Debongnie <ged@odoo.com> | 2017-03-05 09:34:56 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-04-11 19:44:38 +0200 |
| commit | e5740270568404d71a3bc093074a085c9c2eded8 (patch) | |
| tree | 7b84740d92c550236de25a37cf37d244760bdbf3 /addons/web_tour/static/src/js/debug_manager.js | |
| parent | 0df9968433389e0d504276cd711473c2eef937ae (diff) | |
[REF] web,*: remove 'web.model' and 'web.dataModel
Use this.rpc instead of Model object, with web.ajax if necessary.
nb: EventDispatcherMixin include now the custom_events managment instead
of widget
Diffstat (limited to 'addons/web_tour/static/src/js/debug_manager.js')
| -rw-r--r-- | addons/web_tour/static/src/js/debug_manager.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/addons/web_tour/static/src/js/debug_manager.js b/addons/web_tour/static/src/js/debug_manager.js index 70f323de3bb..484f21b07e2 100644 --- a/addons/web_tour/static/src/js/debug_manager.js +++ b/addons/web_tour/static/src/js/debug_manager.js @@ -4,7 +4,6 @@ odoo.define('web_tour.DebugManager', function (require) { var core = require("web.core"); var DebugManager = require('web.DebugManager'); var Dialog = require("web.Dialog"); -var Model = require('web.Model'); var tour = require('web_tour.tour'); @@ -20,9 +19,12 @@ DebugManager.include({ consume_tours: function () { var active_tours = get_active_tours(); if (active_tours.length > 0) { // tours might have been consumed meanwhile - new Model('web_tour.tour').call('consume', [active_tours]).then(function () { - window.location.reload(); - }); + this.rpc('web_tour.tour', 'consume') + .args([active_tours]) + .exec() + .then(function () { + window.location.reload(); + }); } }, start_tour: function() { |
