Skip to Content
Menu
This question has been flagged
2026 Views

I am creating a button in the model sale.order that pressing the button will now have the stock.picking.form . This is my my sale_view.xml file

<record model="ir.actions.act_window" id="vista_stock_picking">
    <field name="name">Vista stock picking</field>
    <field name="type">ir.actions.act_window</field>
    <field name="res_model">stock.picking</field>
    <field name="view_type">form</field>
    <field name="view_id" ref="stock.view_picking_form"/>
    <field name="target">new</field>
</record>  

And in Form view sale.order model , I created the button:

<button name="%(vista_stock_picking)d" string="Vista stock picking" type="action"/>

I checked the documentation Odoo but I had no clear information .

If someone could help me I would be very grateful.

Thanks.

Avatar
Discard