<record id="view_stock_quant_tree_inherit" model="ir.ui.view">
<field name="name">stock.quant.tree.inherit</field>
<field name="model">stock.quant</field>
<field name="inherit_id" ref="stock.view_stock_quant_tree"/>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='inventory_value']" position="after">
<button name="%(act_stock_move)d" type="action" context="{'default_location_id': location_id, 'product_id': product_id, 'default_move_lines': [(0, 0, {'product_id':product_id, 'product_uom_qty': 10})]}" string="Move Stock"/>
</xpath>
</data>
</field>
</record>
<record id="act_stock_move" model="ir.actions.act_window">
<field name="name">New Stock Move</field>
<field name="res_model">stock.picking</field>
<field name="view_id" ref="stock.view_picking_form"/>
<field name="target">new</field>
</record>
Can I do something like this??
I just want to create a stock move which will move the selected product from one location to other??
I am unable to set the field "move_lines" which is a one2many field.
Can anyone help me?