[FIX] null >= 0 is true...

bzr revid: xmo@openerp.com-20131014155709-9cg4bzof02bhtyts
This commit is contained in:
Xavier Morel 2013-10-14 17:57:09 +02:00
parent bb47a9b3bc
commit 7d2938394f
1 changed files with 6 additions and 2 deletions

View File

@ -503,10 +503,14 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
var reloaded = $.Deferred();
this.$el.find('.oe_list_content').append(
this.groups.render(function () {
if (self.dataset.index == null && self.records.length ||
self.dataset.index >= self.records.length) {
if (self.dataset.index == null) {
if (self.records.length) {
self.dataset.index = 0;
}
} else if (self.dataset.index >= self.records.length) {
self.dataset.index = 0;
}
self.compute_aggregates();
reloaded.resolve();
}));