summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/_deprecated
diff options
context:
space:
mode:
authorRaphael Collet <rco@odoo.com>2019-02-15 14:36:39 +0000
committerRaphael Collet <rco@odoo.com>2019-03-22 16:42:08 +0000
commit1ced3bfca457ac50845637bcd42a8e53bd7f088d (patch)
treeab337f64040089777f509f24dc08fd08de57baeb /addons/web/static/src/js/_deprecated
parent579965adc5cf6db67e5dc3b3c6dfd9162b171e90 (diff)
[FIX] *: pass context in kwargs in rpc calls
Diffstat (limited to 'addons/web/static/src/js/_deprecated')
-rw-r--r--addons/web/static/src/js/_deprecated/data.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/web/static/src/js/_deprecated/data.js b/addons/web/static/src/js/_deprecated/data.js
index acac959fcc8..71ae101da7a 100644
--- a/addons/web/static/src/js/_deprecated/data.js
+++ b/addons/web/static/src/js/_deprecated/data.js
@@ -835,13 +835,13 @@ var Model = Class.extend({
},
call_button: function (method, args) {
pyUtils.ensure_evaluated(args, {});
+ // context should be the last argument
+ var context = (args || []).length > 0 ? args.pop() : {};
return session.rpc('/web/dataset/call_button', {
model: this.name,
method: method,
- // Should not be necessary anymore. Integrate remote in this?
- domain_id: null,
- context_id: args.length - 1,
- args: args || []
+ args: args || [],
+ kwargs: {context: context},
});
},
});