summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/core/mixins.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2017-03-01 15:01:15 +0100
committerAaron Bohy <aab@odoo.com>2017-04-11 19:44:38 +0200
commit928af2b51fca5f3e120fbd7f74b77c27a104ba6a (patch)
tree662584833ce5e61ff96f5eb37bdb94a3c5b71947 /addons/web/static/src/js/core/mixins.js
parent979d82abe8e9458e9d31d0f0fb54c446e8abefe3 (diff)
[IMP] web: ajax service: ensure widget is alive
... before resolving/rejecting the deferred once the RPC is done. Doing this in the ajax service is equal to wrap every rpc with this.alive() in the former versions.
Diffstat (limited to 'addons/web/static/src/js/core/mixins.js')
-rw-r--r--addons/web/static/src/js/core/mixins.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/js/core/mixins.js b/addons/web/static/src/js/core/mixins.js
index 93468e03fc0..6f640cb3300 100644
--- a/addons/web/static/src/js/core/mixins.js
+++ b/addons/web/static/src/js/core/mixins.js
@@ -456,7 +456,8 @@ var ServiceProvider = {
},
_call_service: function (event) {
var service = this.services[event.data.service];
- var result = service[event.data.method].apply(service, event.data.args);
+ var args = event.data.args.concat(event.target);
+ var result = service[event.data.method].apply(service, args);
event.data.callback(result);
},
};