diff options
| author | Lucas Perais (lpe) <lpe@odoo.com> | 2021-02-12 10:49:34 +0000 |
|---|---|---|
| committer | Lucas Perais (lpe) <lpe@odoo.com> | 2021-02-15 09:44:04 +0000 |
| commit | 8b6e86927941dce2018ea93f191b59856ea67e4b (patch) | |
| tree | e98e6d5e11da6864d8e183840012d76e60e94249 /addons/web/static/src/js/views/list | |
| parent | 23fcaeda6830f2dc0de17337f9c3da8faf0338ce (diff) | |
[FIX] web: multiedit in a grouped list view: enable fetchBatchedM2O and References
Have grouped list with reference a m2o or a reference field
Select some records, edit them
Before this commit: the names of the reference fields and m2o disappeared
That was because the saveRecords function did not take into account a grouped list
manual forward port of #65999
After this commit: it works as expected
closes odoo/odoo#66043
closes odoo/odoo#66140
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/list')
| -rw-r--r-- | addons/web/static/src/js/views/list/list_model.js | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/addons/web/static/src/js/views/list/list_model.js b/addons/web/static/src/js/views/list/list_model.js index 5d40343ef8d..5a8771c0da3 100644 --- a/addons/web/static/src/js/views/list/list_model.js +++ b/addons/web/static/src/js/views/list/list_model.js @@ -82,10 +82,17 @@ odoo.define('web.ListModel', function (require) { self._parseServerData(fieldNames, record, record.data); }); }).then(function () { - return Promise.all([ - self._fetchX2ManysBatched(list), - self._fetchReferencesBatched(list) - ]); + if (!list.groupedBy.length) { + return Promise.all([ + self._fetchX2ManysBatched(list), + self._fetchReferencesBatched(list) + ]); + } else { + return Promise.all([ + self._fetchX2ManysSingleBatch(list), + self._fetchReferencesSingleBatch(list) + ]); + } }); }, |
