diff options
| author | Fabien Meghazi <fme@openerp.com> | 2013-09-24 14:51:03 +0200 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2013-09-24 14:51:03 +0200 |
| commit | 3ddeaee79cecc404111192f4181a4247e93207f7 (patch) | |
| tree | df8d14ff5903e7d6f6f55d0ffbbb116dbcbd9740 /addons/web/static/src/js/data.js | |
| parent | 18acfa505abd53d526f3288dbe2a9643d7112077 (diff) | |
| parent | bc0d066505a054389525cdf7601b35751ea3efbb (diff) | |
[MERGE] upstream
bzr revid: fme@openerp.com-20130814164422-l0h0ueue0fwk94uu
bzr revid: chm@openerp.com-20130828165815-a901l9gx66lj0pj1
bzr revid: fme@openerp.com-20130924125103-65bngr3rnm6k7u3a
Diffstat (limited to 'addons/web/static/src/js/data.js')
| -rw-r--r-- | addons/web/static/src/js/data.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js index 26807a2ee0f..04f657d91f7 100644 --- a/addons/web/static/src/js/data.js +++ b/addons/web/static/src/js/data.js @@ -61,18 +61,19 @@ instance.web.Query = instance.web.Class.extend({ }, _execute: function () { var self = this; - return this._model.call('search_read', { + return instance.session.rpc('/web/dataset/search_read', { + model: this._model.name, + fields: this._fields || false, domain: instance.web.pyeval.eval('domains', [this._model.domain(this._filter)]), - fields: this._fields || false, - offset: this._offset, - limit: this._limit, - order: instance.web.serialize_sort(this._order_by), context: instance.web.pyeval.eval('contexts', [this._model.context(this._context)]), + offset: this._offset, + limit: this._limit, + sort: instance.web.serialize_sort(this._order_by) }).then(function (results) { self._count = results.length; - return results; + return results.records; }, null); }, /** @@ -450,7 +451,7 @@ instance.web.DataSet = instance.web.Class.extend(instance.web.PropertiesMixin, // TODO: reorder results to match ids list return this._model.call('read', [ids, fields || false], - {context: this._model.context(options.context)}); + {context: this.get_context(options.context)}); }, /** * Read a slice of the records represented by this DataSet, based on its |
