Destroy search window before creating the new form window

Because of the flag DIALOG_DESTROY_WITH_PARENT, the search window can not be
destroyed by the callback of the form window because the form window is also
destroyed too early.

issue2522
This commit is contained in:
Cédric Krier
2012-03-29 17:57:00 +02:00
parent 90506b48bc
commit 5fc2e616f4
+1 -1
View File
@@ -118,7 +118,7 @@ class WinSearch(NoModal):
record = screen.current_record
res = [(record.id, record.value.get('rec_name', ''))]
self.callback(res)
self.destroy()
self.destroy()
WinForm(screen, callback, new=True)
return
if res: