[FIX] view_list: when we have more than 80 record in list and we create new record and switch the views like form->list->form gives traceback. Get if the index is over the number of visible records
bzr revid: chm@openerp.com-20130606142616-41xxepfzkdvyqu9m
This commit is contained in:
parent
b151613f0d
commit
7ad343636b
|
@ -503,12 +503,9 @@ 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) {
|
||||
var has_one = false;
|
||||
self.records.each(function () { has_one = true; });
|
||||
if (has_one) {
|
||||
if (self.dataset.index == null && self.records.length ||
|
||||
self.dataset.index >= self.records.length) {
|
||||
self.dataset.index = 0;
|
||||
}
|
||||
}
|
||||
self.compute_aggregates();
|
||||
reloaded.resolve();
|
||||
|
|
Loading…
Reference in New Issue