El 29/06/18 a les 09:52, Carlos Gálvez ha escrit:
>
> 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 is the same as button_acciont('mymodule.myaction') which is simplier.
> and adding a domain to this act_window:
>
> <field name="domain" eval="[('myfield.id', 'in',
> Eval('active_ids'))]" pyson="1"/>
Of course, if the new created records are related to the current records
a domain can be used to remove the wizard.
Just for the record if myfield is a many2one field, there is no need to
include the '.id' part and this will avoid and extra join to the target
table.
--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk
--
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/b408dab5-6b33-2c24-3c43-c488037d46ac%40koolpi.com.