I know how to render a view with a function, by returning a dictionnary containing the description of the function. But, I would like to render a view (a wizard form) to ask something to the user. Then, continue the method when the view is closed.
The reason I don't want to separate the rest in another function is that, then, someone with enough access rights might just call the second function, and the check performed by the wizard would not be done.
Is that even possible ?
The ideal function:
@api.multi
def dangerous_function(self):
# challenge for password
[...]
# dangerous code starts here
[...]
The not so ideal but easier to implement functions:
@api.multi
def challenge_password(self):
return [...] # a view that, on press OK, will call next function>
@api.multi
# dangerous code starts here
# is callable independently, let's say, from a server action: no check password in this case !