changeset b1b613ba6059 in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset&node=b1b613ba6059
description:
        Recursively destroy records before propagating the signal

        issue10686
        review371591003
diffstat:

 tryton/gui/window/view_form/model/group.py |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r 3b129cae8778 -r b1b613ba6059 tryton/gui/window/view_form/model/group.py
--- a/tryton/gui/window/view_form/model/group.py        Sat Aug 21 09:09:56 
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 = {}

Reply via email to