Wizards that don't display a window result in a crash when trying to show them again
A customer has put three actions in the user's starting actions. Among those three actions there are two wizards that conditionally don't display anything and transition directly to the end state.
Everything was OK when there was only those two wizards but adding the third action (which is an act_form
) result in this traceback:
2024-01-16 17:44:17.949:ERROR: File "/home/nicoe/projets/customers/coopengo/tryton/tryton/tryton/common/common.py", line 1237, in process
self.callback(return_)
File "/home/nicoe/projets/customers/coopengo/tryton/tryton/tryton/gui/window/wizard.py", line 158, in end_callback
self.destroy(action=action())
File "/home/nicoe/projets/customers/coopengo/tryton/tryton/tryton/gui/window/wizard.py", line 385, in destroy
dialog.show()
File "/home/nicoe/projets/customers/coopengo/tryton/tryton/tryton/gui/window/wizard.py", line 415, in show
view = self.screen.current_view
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'current_view'
This is triggered because after this change the main window now has a page and the dialogs has been added to this page. But since the dialog has never shown anything there is no screen linked to the dialog which results in the traceback.