changeset eec33f5ae46d in tryton:6.0
details: https://hg.tryton.org/tryton?cmd=changeset&node=eec33f5ae46d
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 0050fc1a2d60 -r eec33f5ae46d tryton/gui/window/view_form/model/group.py
--- a/tryton/gui/window/view_form/model/group.py Wed Sep 01 22:47:02
2021 +0200
+++ b/tryton/gui/window/view_form/model/group.py Thu Sep 02 14:50:23
2021 +0200
@@ -133,9 +133,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 = {}