changeset 7cae3ee7c17b in sao:default
details: https://hg.tryton.org/sao?cmd=changeset&node=7cae3ee7c17b
description:
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
diffstat:
src/model.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r e0fdc0f1451d -r 7cae3ee7c17b src/model.js
--- a/src/model.js Mon Apr 25 23:20:57 2022 +0200
+++ b/src/model.js Mon Apr 25 23:22:20 2022 +0200
@@ -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;
}
},