diff options
| author | Géry Debongnie <ged@odoo.com> | 2017-03-07 16:14:05 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-04-11 19:44:38 +0200 |
| commit | 86a87aa8b0dde2237cfe1bb769724e8ed269b62e (patch) | |
| tree | 472de08242d81d1811c23dbfcd4381a903917d85 /addons/web/static/src/js/chrome/action_manager.js | |
| parent | 78c97e6cc4c90036e68ad8f82b3c7d326b321067 (diff) | |
[REF] *: use _rpc method for all rpcs
The _rpc method is now the preferred method to do a rpc, so we need to
update all calls.
Diffstat (limited to 'addons/web/static/src/js/chrome/action_manager.js')
| -rw-r--r-- | addons/web/static/src/js/chrome/action_manager.js | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/addons/web/static/src/js/chrome/action_manager.js b/addons/web/static/src/js/chrome/action_manager.js index 8db4fab8094..fdfc33f74f5 100644 --- a/addons/web/static/src/js/chrome/action_manager.js +++ b/addons/web/static/src/js/chrome/action_manager.js @@ -559,11 +559,14 @@ var ActionManager = Widget.extend({ if (warm) { this.null_action(); } - action_loaded = this.rpc('/web/session/get_session_action', {key: state.sa}).then(function(action) { - if (action) { - return self.do_action(action); - } - }); + action_loaded = this._rpc('/web/session/get_session_action') + .params({key: state.sa}) + .exec() + .then(function(action) { + if (action) { + return self.do_action(action); + } + }); } return $.when(action_loaded || null).done(function() { @@ -832,12 +835,15 @@ var ActionManager = Widget.extend({ }, ir_actions_server: function (action, options) { var self = this; - return this.performRPC('/web/action/run', { - action_id: action.id, - context: action.context || {} - }).then(function (action) { - return self.do_action(action, options); - }); + return this._rpc('/web/action/run') + .params({ + action_id: action.id, + context: action.context || {} + }) + .exec() + .then(function (action) { + return self.do_action(action, options); + }); }, ir_actions_report_xml: function(action, options) { var self = this; |
