Hi,
I try to create a New button in the manytoone field prodLot_id in the stock.move object,
I do a new button in the form, that open the windows to create a New lote sequence:
<button name="%(production_lots_form)d"
groups="base.group_extended"
string="NewLot" type="action" icon="terp-stock_effects-object-colorize" colspan="1" />
<!-- The action that will be triggered by the button. -->
<record id="production_lots_form" model="ir.actions.act_window">
<field name="name">Production Lots Form</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">stock.production.lot</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<!-- <field name="domain">here_provide_your_domain_conditon_as list_of_tuples</field> -->
<field name="context">{'default_product_id':product_id}</field>
</record>
The button works ok and open the form, but I can't send the product in use in stock.move form to stock.production.lot form and return the value chosen in field name to prodLot_id field in stock.move.
Using context doesn't work, the field product in blank, maybe I am missing something, also I try in the configuration menu administrator/action windows add the context, same result.
Thanks.