summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework/data.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-04-25 14:43:44 +0200
committerChristophe Simonis <chs@odoo.com>2016-04-25 14:43:44 +0200
commitbb8f0f1fc3d0f5574938019ca69cc917a55e7962 (patch)
treea6662094bb9c307981461fdb9872195032f2da06 /addons/web/static/src/js/framework/data.js
parent9ad6a9df6e5e5654bc98c4c655848404b4e946b2 (diff)
parent4d337f72ed59d1e5260fa2bb4f3d238e6ed11415 (diff)
[MERGE] forward port of branch saas-9 up to 4d337f7
Diffstat (limited to 'addons/web/static/src/js/framework/data.js')
-rw-r--r--addons/web/static/src/js/framework/data.js6
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');
});
},