Hi Sergi,
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.
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'))
and adding a domain to this act_window:
<field name="domain" eval="[('myfield.id', 'in', Eval('active_ids'))]"
pyson="1"/>
Yours gratefully,
*Carlos Gálvez*
Developer
*[email protected] <[email protected]>*
*http://www.NaN-tic.com <http://www.nan-tic.com/> *
*Telf: (+34) 935 531 803 <+34%20935%2053%2018%2003> *
*http://twitter.com/nan_tic <http://twitter.com/nan_tic> *
*http://www.nan-tic.com/blog <http://www.nan-tic.com/blog>*
--
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/CAOq2ZJo%3DgLUmwz3MgQHibsJijVbfB7KyQ5Hr2yevUkXhXKv-%2BQ%40mail.gmail.com.