Simplify state management of proteus wizard
We keep 2 states because we need to know from which state we come from to fill data
. But instead of keeping the form_state
as an instance attribute we could just keep the value in a variable inside Wizard.execute
. Also we could update the state
attribute with the state of the view.
Also the while
loop is not necessary as if the result of the execution is not a view, the state
is set to end_state
which stop the loop. And if the result is a view, the loop is stopped by a return.