[FIX] don't break the handling of record index 0 in editable list views: index 0...
authorXavier Morel <xmo@openerp.com>
Thu, 14 Jun 2012 08:50:09 +0000 (10:50 +0200)
committerXavier Morel <xmo@openerp.com>
Thu, 14 Jun 2012 08:50:09 +0000 (10:50 +0200)
bzr revid: xmo@openerp.com-20120614085009-xuo1ifu2vnlcic72

addons/web/static/src/js/view_list_editable.js

index aaa8adf..c43ec9d 100644 (file)
@@ -233,7 +233,7 @@ openerp.web.list_editable = function (openerp) {
                 }
                 self.edition = true;
                 self.edition_id = record_id;
-                self.dataset.index = _(self.dataset.ids).indexOf(record_id) || null;
+                self.dataset.index = _(self.dataset.ids).indexOf(record_id);
                 if (self.dataset.index === -1) {
                     self.dataset.index = null;
                 }