changeset 167341b11f7c in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset&node=167341b11f7c
description:
Trigger group_list_changed to all screens linked to the group
In a tree structure a group and its parent can be linked at any level
to a
screen which may have tree views for which the model must be updated.
issue11809
review428041003
diffstat:
tryton/gui/window/view_form/model/group.py | 19 +++++++++++--------
1 files changed, 11 insertions(+), 8 deletions(-)
diffs (29 lines):
diff -r 1b1b11be474f -r 167341b11f7c tryton/gui/window/view_form/model/group.py
--- a/tryton/gui/window/view_form/model/group.py Wed Oct 26 23:32:27
2022 +0200
+++ b/tryton/gui/window/view_form/model/group.py Wed Oct 26 23:34:13
2022 +0200
@@ -502,14 +502,17 @@
return record
def _group_list_changed(self, action, *args):
- group = self
- while group.parent:
- if group.model_name != group.parent.model_name:
- break
- else:
- group = group.parent.group
- for screen in group.screens:
- screen.group_list_changed(group, action, *args)
+ def groups(group):
+ yield group
+ while group.parent:
+ if group.model_name != group.parent.model_name:
+ break
+ else:
+ group = group.parent.group
+ yield group
+ for group in groups(self):
+ for screen in group.screens:
+ screen.group_list_changed(group, action, *args)
def record_modified(self):
if not self.parent: