diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2018-08-28 11:54:36 +0200 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2018-09-03 15:58:52 +0200 |
| commit | 388eff5b589ee3b072fa88817fdc415759d859ce (patch) | |
| tree | c8849ab25df2eb2b40e76fa8a182b76a224bdf7d /addons/web/static/src/js | |
| parent | 98665aca1cb5aa3afadd8f286ce9788588d8f326 (diff) | |
[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
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/views/kanban/kanban_model.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/kanban/kanban_model.js b/addons/web/static/src/js/views/kanban/kanban_model.js index 08031e05dfe..7d47a081b0a 100644 --- a/addons/web/static/src/js/views/kanban/kanban_model.js +++ b/addons/web/static/src/js/views/kanban/kanban_model.js @@ -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); }, /** |
