[IMP] web: allow no open in x2m list view in form view
Before this commit, when we set `no_open` in list view for x2m record in form view, the no_open is not take into account. Either the list is editable and then the form dialog is no displayed and the user can edit in the list or the list view is readonly and when the user clicks on a row in this list view, the form view dialog appears. This commit changes the condition in the `no_open` to force to set to true when the no_open is set to true. So, when the no_open=True even if the list view of x2m record is in readonly, the form view dialog is not called and thus it will no longer appear in this case. task-2379518 closes #73341
This commit is contained in:
@@ -1486,8 +1486,8 @@ var FieldX2Many = AbstractField.extend(WidgetAdapterMixin, {
|
||||
addCreateLine: this._hasCreateLine(),
|
||||
addTrashIcon: this._hasTrashIcon(),
|
||||
isMany2Many: this.isMany2Many,
|
||||
no_open: (this.isReadonly && !this.hasReadonlyModifier) &&
|
||||
(this._canQuickEdit || toBoolElse(arch.attrs.no_open || '', false)),
|
||||
no_open: ((this.isReadonly && !this.hasReadonlyModifier) &&
|
||||
this._canQuickEdit) || toBoolElse(arch.attrs.no_open || '', false),
|
||||
columnInvisibleFields: this.currentColInvisibleFields,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user