[FIX] web: keep o2m current page in correct range
when going through different form view records For example, when being on page 4 of a o2m then switching to next form view record, if this new record did not have 4 pages for this o2m, the o2m was shown empty (and if there was no page, the o2m became unusable)
This commit is contained in:
@@ -4606,7 +4606,14 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
|
||||
this.dataset.evict_record(record.get('id'));
|
||||
|
||||
return this._super(record);
|
||||
}
|
||||
},
|
||||
reload_content: function () {
|
||||
this.page = Math.min(
|
||||
this.page,
|
||||
Math.ceil(this.dataset.size() / this.limit()) - 1
|
||||
);
|
||||
return this._super.apply(this, arguments);
|
||||
},
|
||||
});
|
||||
instance.web.form.One2ManyGroups = instance.web.ListView.Groups.extend({
|
||||
setup_resequence_rows: function () {
|
||||
|
||||
Reference in New Issue
Block a user