<?xml version="1.0"?>
<openerp>
    <data>

       <record id="stock_location_path_tree" model="ir.ui.view">
            <field name="name">stock.location.path.tree</field>
            <field name="model">stock.location.path</field>
            <field name="arch" type="xml">
                <tree string="Location Paths">
                    <field name="location_from_id"/>
                    <field name="location_dest_id"/>
                    <field name="name"/>
                </tree>
            </field>
        </record>

       <record id="stock_location_path_form" model="ir.ui.view">
            <field name="name">stock.location.path.form</field>
            <field name="model">stock.location.path</field>
            <field name="arch" type="xml">
                <form string="Location Paths" version="7.0">
                    <group col="4">
                        <field name="name"/>
                        <newline/>
                        <field name="company_id" groups="base.group_multi_company"/>
                        <newline/>
                        <field name="location_from_id"/>
                        <field name="location_dest_id"/>
                        <field name="auto"/>
                        <field name="delay"/>
                    </group>
                </form>
            </field>
        </record>

       <record id="product_normal_form_inherit_location" model="ir.ui.view">
            <field name="name">product.product.form</field>
            <field name="model">product.product</field>
            <field name="inherit_id" ref="product.product_normal_form_view"/>
            <field name="arch" type="xml">
                <group name="inventory" position="after">
                    <group string="Pull Flow">
                        <field name="flow_pull_ids" colspan="4" nolabel="1">
                            <tree string="Pulled flows">
                                <field name="name"/>
                                <field name="location_id" attrs="{'required': [('type_proc', '=', 'move')]}"/>
                                <field name="type_proc"/>
                                <field name="journal_id"/>
                                <field name="company_id" groups="base.group_multi_company"/>
                            </tree>
                            <form string="Pulled Paths">
                                <group>
                                    <group string="Conditions">
                                        <field name="name" placeholder="Fulfill needs on location X from location Y "/>
                                        <field name="location_id"/>
                                    </group>
                                    <group string="Action Type">
                                        <field name="type_proc"/>
                                        <field name="company_id"/>
                                    </group>
                                </group>
                                <group attrs="{'invisible':[('type_proc','!=','move')]}">
                                    <field name="location_src_id" attrs="{'required': [('type_proc', '=', 'move')]}"/>
                                    <field name="picking_type"/>
                                    <field name="partner_address_id"/>
                                    <field name="procure_method"/>
                                    <field name="cancel_cascade"/>
                                    <field name="invoice_state"/>
                                    <field name="journal_id"/>
                                </group>
                            </form>
                        </field>
                    </group>
                    <group string="Push Flow">
                        <field name="path_ids" nolabel="1">
                            <tree string="Pushed flows">
                                <field name="location_from_id"/>
                                <field name="location_dest_id"/>
                                <field name="auto"/>
                                <field name="name"/>
                                <field name="invoice_state"/>
                                <field name="company_id" groups="base.group_multi_company"/>
                            </tree>
                            <form string="Pushed flows">
                                <field name="name" placeholder="When receiving at location X, move to location Y"/>
                                <field name="location_from_id"/>
                                <field name="location_dest_id"/>
                                <field name="auto"/>
                                <field name="delay"/>
                                <field name="journal_id"/>
                                <field name="picking_type"/>
                                <field name="invoice_state"/>
                                <field name="company_id" groups="base.group_multi_company"/>
                            </form>
                        </field>
                    </group>
                </group>
            </field>
       </record>
    </data>
</openerp>
