diff options
| author | Minh Tran <mit@openerp.com> | 2012-01-11 12:08:03 +0100 |
|---|---|---|
| committer | Minh Tran <mit@openerp.com> | 2012-01-11 12:08:03 +0100 |
| commit | ce2202a823b1469c50412bbbe7b8bfda04b0718b (patch) | |
| tree | 163b7eaac8f7a596f015eec8098ac7d4d33862cb /addons/web/static/src/js/data.js | |
| parent | d63c20b73de27d5b272ce8b1442044cc8d5fbb93 (diff) | |
| parent | 2b736ee2cf2037734fd426bd968b6294a7a843e4 (diff) | |
Merge from trunk
bzr revid: mit@openerp.com-20120111110803-pcizwc2x9w51tsdx
Diffstat (limited to 'addons/web/static/src/js/data.js')
| -rw-r--r-- | addons/web/static/src/js/data.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js index c24325a9327..3b444dffc78 100644 --- a/addons/web/static/src/js/data.js +++ b/addons/web/static/src/js/data.js @@ -322,16 +322,17 @@ openerp.web.DataSet = openerp.web.Widget.extend( /** @lends openerp.web.DataSet * Reads the current dataset record (from its index) * * @params {Array} [fields] fields to read and return, by default all fields are returned + * @param {Object} [options.context] context data to add to the request payload, on top of the DataSet's own context * @params {Function} callback function called with read_index result * @returns {$.Deferred} */ - read_index: function (fields, callback) { + read_index: function (fields, options, callback) { var def = $.Deferred().then(callback); if (_.isEmpty(this.ids)) { def.reject(); } else { fields = fields || false; - this.read_ids([this.ids[this.index]], fields).then(function(records) { + this.read_ids([this.ids[this.index]], fields, options).then(function(records) { def.resolve(records[0]); }, function() { def.reject.apply(def, arguments); |
