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.