<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        
        <record id="stock_picking_inherit_purchase" model="ir.ui.view">
            <field name="name">Packing list</field>
            <field name="model">stock.picking</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="stock.view_picking_form"/>
            <field name="arch" type="xml">
                <field name="active" position="after">
                    <field name="purchase_id"/>
                </field>
            </field>
        </record>
        
        <act_window
            domain="[('purchase_id', '=', active_id)]" 
            id="act_purchase_order_2_stock_picking" 
            name="Packing" 
            res_model="stock.picking" 
            src_model="purchase.order"
            context="{'contact_display': 'partner'}"
            />
		
		<record id="action_picking_in_tree_view" model="ir.actions.act_window.view">
            <field eval="1" name="sequence"/>
            <field name="view_mode">tree</field>
            <field name="view_id" ref="stock.view_picking_in_tree"/>
            <field name="act_window_id" ref="act_purchase_order_2_stock_picking"/>
        </record>
        <record id="action_picking_in_form_view" model="ir.actions.act_window.view">
            <field eval="2" name="sequence"/>
            <field name="view_mode">form</field>
            <field name="view_id" ref="stock.view_picking_in_form"/>
            <field name="act_window_id" ref="act_purchase_order_2_stock_picking"/>
        </record>
        
		<record id="stock_picking_in_inherit_purchase" model="ir.ui.view">
            <field name="name">Incoming Picking Inherited</field>
            <field name="model">stock.picking</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="stock.view_picking_in_form"/>
            <field name="arch" type="xml">
                <field name="backorder_id" position="after">
                    <field name="purchase_id"/>
                </field>
            </field>
        </record>
         
        
    </data>
</openerp>
