[FIX] Correctly set index in DataSetStatic constructor
authorFabien Meghazi <fme@openerp.com>
Tue, 28 Jun 2011 09:58:58 +0000 (11:58 +0200)
committerFabien Meghazi <fme@openerp.com>
Tue, 28 Jun 2011 09:58:58 +0000 (11:58 +0200)
bzr revid: fme@openerp.com-20110628095858-euv72cho29rbu3hl

addons/base/static/src/js/data.js

index 9a10a08..a0448a4 100644 (file)
@@ -353,6 +353,9 @@ openerp.base.DataSetStatic =  openerp.base.DataSet.extend({
         // all local records
         this.ids = ids || [];
         this.count = this.ids.length;
+        if (this.ids.length) {
+            this.index = 0;
+        }
     },
     read_slice: function (fields, offset, limit, callback) {
         var self = this;