diff options
| author | Lucas Perais (lpe) <lpe@odoo.com> | 2020-09-03 15:19:26 +0000 |
|---|---|---|
| committer | Lucas Perais (lpe) <lpe@odoo.com> | 2020-09-04 11:51:31 +0000 |
| commit | 0e12fa135882cd5095dbf15fe2f64231c6a84336 (patch) | |
| tree | aab11c62659c2b15e045031672aaa08dd130d26f /addons/web/static/src/js/views/basic | |
| parent | 789ec45b43bb8f36bb5be65fcb2ef46119fd0acf (diff) | |
[FIX] web: avoid displaying noContentHelper after kanban quick_create
Have a kanban with a filter
Quick create a record in one column that won't match the domain
Before this commit, the noContent helper was displayed. This was because
the count of the group was reset to zero after the web_read_group call.
After this commit, the noContent helper is not displayed.
Note that in the quick_create situation, the records are not re-fetched
i.e. there is no search_read after the read_group.
Task-id 2251734
closes odoo/odoo#57066
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic')
| -rw-r--r-- | addons/web/static/src/js/views/basic/basic_model.js | 8 |
1 files changed, 8 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 24373e3b753..5be80268cc6 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -4602,6 +4602,14 @@ var BasicModel = AbstractModel.extend({ // sub-groups // Also keep data if we only reload groups' own data updatedProps.data = oldGroup.data; + if (options.onlyGroups) { + // keep count and res_ids as in this case the group + // won't be search_read again. This situation happens + // when using kanban quick_create where the record is manually + // added to the datapoint before getting here. + updatedProps.res_ids = oldGroup.res_ids; + updatedProps.count = oldGroup.count; + } } _.extend(newGroup, updatedProps); // set the limit such that all previously loaded records |
