From 638fcb8b5dbb711d70c11dcfde77c3459936f33c Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Fri, 2 Sep 2022 13:17:58 +0000 Subject: [PATCH] [FIX] web: list: have readonly legacy fields in confirm dialog Before this commit, if the user multi-edited a field in a list view, and the widget on that field was legacy, this widget was displayed in edition in the confirmation dialog. This was because the "mode" argument wasn't correctly computed in the legacy compatibility layer. This fix comes with no test as this layer will be removed in the next week or two. Part-of: odoo/odoo#99503 --- addons/web/static/src/legacy/legacy_fields.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/legacy/legacy_fields.js b/addons/web/static/src/legacy/legacy_fields.js index 13ba37903a4..b07205d26b7 100644 --- a/addons/web/static/src/legacy/legacy_fields.js +++ b/addons/web/static/src/legacy/legacy_fields.js @@ -328,7 +328,7 @@ function registerField(name, LegacyFieldWidget) { mode: fieldInfo.viewMode, }, viewType: legacyRecord.viewType, - mode: hasReadonlyModifier ? "readonly" : record.mode, + mode: this.props.readonly || hasReadonlyModifier ? "readonly" : record.mode, hasReadonlyModifier, }; return { name, record: legacyRecord, options };