diff options
| author | Olivier Dony <odo@openerp.com> | 2016-04-21 18:05:02 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2016-04-21 18:05:14 +0200 |
| commit | ee804e1d329e3d7b11fc19707be568c09b9ff5dd (patch) | |
| tree | f3e709ac4105295479d0da05f1fa927b66bfc22a /addons/web/static/src/js/framework/data.js | |
| parent | 73fbadf8ae3377e2d16f5538a9feaab0d9f7d315 (diff) | |
| parent | 74d8cbc190d1a93ef699ee254b1efbc88d2a1e26 (diff) | |
[MERGE] Forward-port 9.0 up to 74d8cbc190d1a93ef699ee254b1efbc88d2a1e26
Diffstat (limited to 'addons/web/static/src/js/framework/data.js')
| -rw-r--r-- | addons/web/static/src/js/framework/data.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/web/static/src/js/framework/data.js b/addons/web/static/src/js/framework/data.js index a1b8e1602e9..3e9396a4e96 100644 --- a/addons/web/static/src/js/framework/data.js +++ b/addons/web/static/src/js/framework/data.js @@ -320,6 +320,7 @@ var DataSet = Class.extend(mixins.PropertiesMixin, { this.index = null; this._sort = []; this._model = new Model(model, context); + this.orderer = new utils.DropMisordered(); }, previous: function () { this.index -= 1; @@ -408,10 +409,11 @@ var DataSet = Class.extend(mixins.PropertiesMixin, { read_slice: function (fields, options) { var self = this; options = options || {}; - return this._model.query(fields) + var query = this._model.query(fields) .limit(options.limit || false) .offset(options.offset || 0) - .all().done(function (records) { + .all(); + return this.orderer.add(query).done(function (records) { self.ids = _(records).pluck('id'); }); }, |
