changeset f7682f7f12cc in tryton:5.8
details: https://hg.tryton.org/tryton?cmd=changeset&node=f7682f7f12cc
description:
Recursively destroy records before propagating the signal
issue10686
review371591003
(grafted from b1b613ba6059248938777afd16e58eb64b6d18de)
diffstat:
tryton/gui/window/view_form/model/group.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (16 lines):
diff -r a55c46e8b832 -r f7682f7f12cc tryton/gui/window/view_form/model/group.py
--- a/tryton/gui/window/view_form/model/group.py Wed Sep 01 22:47:38
2021 +0200
+++ b/tryton/gui/window/view_form/model/group.py Thu Sep 02 14:50:23
2021 +0200
@@ -131,9 +131,11 @@
# has more chances to be on top of the list.
length = self.__len__()
for record in reversed(self[:]):
+ # Destroy record before propagating the signal to recursively
+ # destroy also the underlying records
+ record.destroy()
self.signal(
'group-list-changed', ('record-removed', record, length - 1))
- record.destroy()
self.pop()
length -= 1
self.__id2record = {}