summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic
diff options
context:
space:
mode:
authorLucas Perais (lpe) <lpe@odoo.com>2021-02-12 15:16:39 +0000
committerLucas Perais (lpe) <lpe@odoo.com>2021-02-15 09:43:33 +0000
commit23fcaeda6830f2dc0de17337f9c3da8faf0338ce (patch)
tree4a90869157b304017b82280c0daa91e773c04d11 /addons/web/static/src/js/views/basic
parente1fc6707ed4ddfe7c62e6beead8617e5fbe6ea9b (diff)
[FIX] web: list multi edit: prevent force save
Have a list with multi_edit enabled Have a widget boolean_toggle displayed on some field Select some records to be in multi edit mode Before this commit, the record on which the boolean toggle button was clicked was written and then the multi edit feature was triggered and wrote on all the records The first write is unnecessary and counter intuitive After this commit, only the write with all the multi edited records is done
Diffstat (limited to 'addons/web/static/src/js/views/basic')
-rw-r--r--addons/web/static/src/js/views/basic/basic_controller.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/basic/basic_controller.js b/addons/web/static/src/js/views/basic/basic_controller.js
index b58a4154e1f..001154d29b4 100644
--- a/addons/web/static/src/js/views/basic/basic_controller.js
+++ b/addons/web/static/src/js/views/basic/basic_controller.js
@@ -706,7 +706,7 @@ var BasicController = AbstractController.extend(FieldManagerMixin, {
* @param {OdooEvent} ev
*/
_onFieldChanged: function (ev) {
- if (this.mode === 'readonly') {
+ if (this.mode === 'readonly' && !('force_save' in ev.data)) {
ev.data.force_save = true;
}
FieldManagerMixin._onFieldChanged.apply(this, arguments);