[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
This commit is contained in:
Aaron Bohy
2022-09-05 12:40:29 +02:00
parent c5291f4cf4
commit 638fcb8b5d
@@ -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 };