diff options
| author | niv-openerp <nicolas.vanhoren@openerp.com> | 2013-08-05 15:04:58 +0200 |
|---|---|---|
| committer | niv-openerp <nicolas.vanhoren@openerp.com> | 2013-08-05 15:04:58 +0200 |
| commit | 226b142ac6d421f7dc5f1bab204f5cde24f1505a (patch) | |
| tree | 406dd9a2ed9280d72f287799da71f4c32f802256 /addons/web/static/src/js/data.js | |
| parent | 70e3af631214b706f22d3992a6b5bfa54781414e (diff) | |
Simplified a little the Query class by removing a reference to a controller and using call_kw instead
bzr revid: nicolas.vanhoren@openerp.com-20130805130458-21w806v9wc456oq4
Diffstat (limited to 'addons/web/static/src/js/data.js')
| -rw-r--r-- | addons/web/static/src/js/data.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js index f333f6a3e4b..986c58270ca 100644 --- a/addons/web/static/src/js/data.js +++ b/addons/web/static/src/js/data.js @@ -58,19 +58,18 @@ instance.web.Query = instance.web.Class.extend({ }, _execute: function () { var self = this; - return instance.session.rpc('/web/dataset/search_read', { - model: this._model.name, - fields: this._fields || false, + return this._model.call('search_read', { domain: instance.web.pyeval.eval('domains', [this._model.domain(this._filter)]), - context: instance.web.pyeval.eval('contexts', - [this._model.context(this._context)]), + fields: this._fields || false, offset: this._offset, limit: this._limit, - sort: instance.web.serialize_sort(this._order_by) + order: instance.web.serialize_sort(this._order_by), + context: instance.web.pyeval.eval('contexts', + [this._model.context(this._context)]), }).then(function (results) { self._count = results.length; - return results.records; + return results; }, null); }, /** |
