[FIX] web: load more with progressbar load more

Be in a grouped kanban view with progressbar with limit 10:

- records 1 to 10 are loaded on a column
- do "Load more..." on a column => records 11 up to 20 are loaded
- do "Load more..." 2nd time => records 11 up to 20 are loaded
- do "Load more..." 3rd time => records 11 up to 20 are loaded
- ...

While in reality it should be:
- do "Load more..." 2nd time => records 21 up to 30 are loaded
- do "Load more..." 3rd time => records 31 up to 40 are loaded
- ...

This was caused by the progressbar reloading the column's group. This
set the loadMoreOffset to 0 thus forgetting the current state.

Without the change, added tests failed with:

 records of column are loaded => actual: "1,2,2", expected: "1,2,3"

opw-1878359
closes #26628
This commit is contained in:
Nicolas Lempereur
2018-09-03 15:58:52 +02:00
parent 98665aca1c
commit 388eff5b58
2 changed files with 34 additions and 0 deletions
@@ -222,6 +222,9 @@ var KanbanModel = BasicModel.extend({
options.groupBy = this.defaultGroupedBy;
}
var def = this._super(id, options);
if (options && options.loadMoreOffset) {
return def;
}
return this._reloadProgressBarGroupFromRecord(id, def);
},
/**