summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/services/data_manager.js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2017-12-06 10:09:02 +0100
committerMartin Geubelle <mge@odoo.com>2018-01-05 17:34:25 +0100
commitb7ee1aa4b1ea906195c234020cb708a1da9de6a7 (patch)
treed6c7263b6b4f40e89ede6b3a55b86909e9ffba15 /addons/web/static/src/js/services/data_manager.js
parentd3cebdc4a2c8cb5c31cc56a79821b09a4d4712a8 (diff)
[FIX] web: sort and onchange in tabbed editable x2m
Two attempts of dealing with sorting (and resequencing) in tabbed (multi-pages) x2many editable lists (see odoo/odoo@c2563db and odoo/odoo@983c7ae) have been previously done, using a static attribute (`keepChangesUnsorted`) on the datapoint. This solution sadly only covers both cases separately, not if they are combined. Morever, onchanges were not correctly managed in neither of these two cases. A new approach is used here, by "freezing" and "unfreezing" the datapoint when needed, which is more flexible. Some modifications have been introduced: - when ordering a x2many, all records are now considered (and not only the records on the current page) ; an additional read is thus done on the sorted field for all records in the x2many relation - `setSort` is now asynchronous as a `read` might be needed
Diffstat (limited to 'addons/web/static/src/js/services/data_manager.js')
-rw-r--r--addons/web/static/src/js/services/data_manager.js6
1 files changed, 0 insertions, 6 deletions
diff --git a/addons/web/static/src/js/services/data_manager.js b/addons/web/static/src/js/services/data_manager.js
index 501961d6d76..9b11f3a54a7 100644
--- a/addons/web/static/src/js/services/data_manager.js
+++ b/addons/web/static/src/js/services/data_manager.js
@@ -365,12 +365,6 @@ return core.Class.extend({
child.attrs.modifiers.column_invisible || false;
}
});
-
- // detect editables list has they behave differently with respect
- // to the sorting (changes are not sorted directly)
- if (mode === 'list' && view.arch.attrs.editable) {
- attrs.keepChangesUnsorted = true;
- }
}
}
if (attrs.Widget.prototype.fieldsToFetch) {