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
This commit is contained in:
1 parent
1d1d8d1ddb
commit
943b3e6094
1 file changed
+11
-8
@@ -502,14 +502,17 @@ class Group(list):
|
||||
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:
|
||||
|
||||
Reference in new issue
Block a user