Closing a window wizard in sao results in an exception
In Sao when trying to close a wizard that has the window field set to true using the close button on the tab an exception is raised. This also happens when the wizard window is open and you perform an action that forces all windows to be closed, such as logging out or opening the user preferences.
This happens for Sao version 5.6 and the current development version, but seems to work correctly on version 5.4 and below. It also seems to work correctly on the desktop client. Tested on Firefox 79.0.
Steps to reproduce:
* Login to the demo server: https://demo5.6.tryton.org/
* Start the Administration / Modules / Perform Pending Activation/Upgrade wizard
* Click Start Upgrade
* Click OK on the "The modules have been upgraded / activated." popup window
* Try and close the "Configuration is done." window using the close icon on the "Module Configuration" tab, or try and logout with the "Module Configuration" window open.
Traceback (most recent call last):
File "/trytond/wsgi.py", line 110, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/dispatcher.py", line 47, in rpc
return methods.get(request.rpc_method, _dispatch)(
File "/wrapt/wrappers.py", line 566, in __call__
return self._self_wrapper(self.__wrapped__, self._self_instance,
File "/trytond/wsgi.py", line 78, in auth_required
return wrapped(*args, **kwargs)
File "/trytond/protocols/wrappers.py", line 131, in wrapper
return func(request, pool, *args, **kwargs)
File "/trytond/protocols/dispatcher.py", line 181, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
File "/trytond/wizard/wizard.py", line 314, in execute
return wizard._execute(state_name)
File "/trytond/wizard/wizard.py", line 320, in _execute
state = self.states[state_name]
KeyError: None