Set as readonly the parent field

When editing record from a tree, user can not change the field which contains
the parent. He must rearrange the tree using the DnD or editing from a list.

issue11022
review407281002
This commit is contained in:
Cédric Krier
2022-04-25 23:22:20 +02:00
parent d1291774fd
commit e9b5f7cc8e
+2 -1
View File
@@ -1619,7 +1619,8 @@
}
}
if (record.group.readonly ||
this.get_state_attrs(record).domain_readonly) {
this.get_state_attrs(record).domain_readonly ||
(record.parent_name == this.name)) {
this.get_state_attrs(record).readonly = true;
}
},