Skip the validation of the parent field of group
This is required because it can happen that a x2M field will have some records set through an on_change but if the x2M is not linked to a screen then exclude_field won't be set. Closes #14283
This commit is contained in:
+1
-1
@@ -1334,7 +1334,7 @@
|
||||
if (field.description.readonly) {
|
||||
continue;
|
||||
}
|
||||
if (fname == this.group.exclude_field) {
|
||||
if ([this.group.exclude_field, this.group.parent_name].includes(fname)) {
|
||||
continue;
|
||||
}
|
||||
if (!field.validate(this, softvalidation, pre_validate)) {
|
||||
|
||||
@@ -447,7 +447,8 @@ class Record:
|
||||
continue
|
||||
if field.attrs.get('readonly'):
|
||||
continue
|
||||
if field_name == self.group.exclude_field:
|
||||
if field_name in {
|
||||
self.group.exclude_field, self.group.parent_name}:
|
||||
continue
|
||||
if not field.validate(self, softvalidation, pre_validate):
|
||||
res = False
|
||||
|
||||
Reference in New Issue
Block a user