diff options
| author | Aaron Bohy <aab@odoo.com> | 2018-01-22 08:57:34 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2018-01-22 20:07:05 +0100 |
| commit | 1c1f6ef557fca350a0d498b78136cdf6a308ec70 (patch) | |
| tree | 5f2d1ed13d46bf3a3e401adea2f0814b3a334d77 /addons/web/static/src/js/views/basic/basic_model.js | |
| parent | cf6697dfbd00a458cb56caf57a0d359310690f55 (diff) | |
[IMP] web: Kanban: keep loaded records when reloading
In a grouped Kanban view, when the user clicks on 'Load More' to
load more records of a given column, then opens one of those
records in the form view, and goes back using the breadcrumbs, the
formerly loaded records should be reloaded, so that the user does
not have to click again on 'Load More' to get to the position he
was previously.
This rev. increases the limit of the given column when the user
clicks on 'Load More' to force this behavior.
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
| -rw-r--r-- | addons/web/static/src/js/views/basic/basic_model.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/basic/basic_model.js b/addons/web/static/src/js/views/basic/basic_model.js index 5296c6db7d5..57ef031a146 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -3652,6 +3652,10 @@ var BasicModel = AbstractModel.extend({ // Also keep data if we only reload groups' own data delete updatedProps.data; } + // set the limit such that all previously loaded records + // (e.g. if we are coming back to the kanban view from a + // form view) are reloaded + oldGroup.limit = oldGroup.limit + oldGroup.loadMoreOffset; _.extend(oldGroup, updatedProps); newGroup = oldGroup; } else if (!newGroup.openGroupByDefault) { |
