diff options
Diffstat (limited to 'addons/base/static/src/js/data.js')
| -rw-r--r-- | addons/base/static/src/js/data.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/addons/base/static/src/js/data.js b/addons/base/static/src/js/data.js index 04c23224806..e95adaf8870 100644 --- a/addons/base/static/src/js/data.js +++ b/addons/base/static/src/js/data.js @@ -355,12 +355,13 @@ openerp.base.DataSet = openerp.base.Widget.extend( /** @lends openerp.base.Data * @param {Function} error_callback function called in case of write error * @returns {$.Deferred} */ - write: function (id, data, callback, error_callback) { + write: function (id, data, options, callback, error_callback) { + var options = options || {}; return this.rpc('/base/dataset/save', { model: this.model, id: id, data: data, - context: this.get_context() + context: this.get_context(options.context) }, callback, error_callback); }, /** @@ -396,18 +397,18 @@ openerp.base.DataSet = openerp.base.Widget.extend( /** @lends openerp.base.Data * * @param {String} method * @param {Array} [args] - * @param {Number} [domain_id] index of a domain to evaluate in the args array - * @param {Number} [context_id] index of a context to evaluate in the args array + * @param {Number} [domain_index] index of a domain to evaluate in the args array + * @param {Number} [context_index] index of a context to evaluate in the args array * @param {Function} callback * @param {Function }error_callback * @returns {$.Deferred} */ - call_and_eval: function (method, args, domain_id, context_id, callback, error_callback) { + call_and_eval: function (method, args, domain_index, context_index, callback, error_callback) { return this.rpc('/base/dataset/call', { model: this.model, method: method, - domain_id: domain_id || null, - context_id: context_id || null, + domain_id: domain_index || null, + context_id: context_index || null, args: args || [] }, callback, error_callback); }, |
