On 2018-06-29 09:52, Carlos Gálvez wrote:
> 2018-06-28 14:47 GMT+02:00 Sergi Almacellas Abellana <[email protected]>:
> >
> >
> > Yes, it is possible. You should use the button_action decorator to
> > returns an wizard with an StateAction from the model of the new created
> > instance.
> >
> > You should set the res_id of the action on the wizard to the ids of the
> > new created instances.
>
>
> Finally, I did not use a "button_action" decorator to return an assistant
> because
> I was not interested in having a wizard dirtying my code, but his
> suggestions showed me the way.
button_action is not limited to wizard, it can be used for any action.
> The way I have done it is returning on my Modelview.button an Action id
> that points to an act_window that open the desired view:
>
> return Action.get_action_id(ModelData.get_id('mymodule', 'myaction'))
This would be cleaner to use the button_action decorator.
--
Cédric Krier - B2CK SPRL
Email/Jabber: [email protected]
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
--
You received this message because you are subscribed to the Google Groups
"tryton-dev" group.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tryton-dev/20180629083908.GK3931%40kei.