[IMP] More dataset refactoring
[odoo/odoo.git] / addons / web / static / src / js / view_list.js
index d4ab397..b9ba171 100644 (file)
@@ -1290,7 +1290,7 @@ openerp.web.ListView.Groups = openerp.web.Class.extend( /** @lends openerp.web.L
         var fields = _.pluck(_.select(this.columns, function(x) {return x.tag == "field"}), 'name');
         var options = { offset: page * limit, limit: limit };
         //TODO xmo: investigate why we need to put the setTimeout
-        $.async_when().then(function() {dataset.read_slice(fields, options , function (records) {
+        $.async_when().then(function() {dataset.read_slice(fields, options).then(function (records) {
             // FIXME: ignominious hacks, parents (aka form view) should not send two ListView#reload_content concurrently
             if (self.records.length) {
                 self.records.reset(null, {silent: true});