<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <!-- After installation of the module, open the related menu -->
        <record id="action_client_warehouse_menu" model="ir.actions.client">
            <field name="name">Open Warehouse Menu</field>
            <field name="tag">reload</field>
            <field name="params" eval="{'menu_id': ref('menu_stock_root')}"/>
        </record>
        <record id="base.open_menu" model="ir.actions.todo">
            <field name="action_id" ref="action_client_warehouse_menu"/>
            <field name="state">open</field>
        </record>
        <record id="view_stock_config_settings" model="ir.ui.view">
            <field name="name">stock settings</field>
            <field name="model">stock.config.settings</field>
            <field name="arch" type="xml">
                <form string="Configure Warehouse" class="oe_form_configuration">
                    <header>
                        <button string="Apply" type="object" name="execute" class="oe_highlight"/>
                        or
                        <button string="Cancel" type="object" name="cancel" class="oe_link"/>
                    </header>
                    <separator string="Traceability"/>
                    <group name="traceability">
                        <label for="id" string="Traceability"/>
                        <div>
                            <div>
                                <field name="group_stock_production_lot" class="oe_inline"/>
                                <label for="group_stock_production_lot"/>
                            </div>
                            <div attrs="{'invisible': [('group_stock_production_lot','=',False)]}">
                                <field name="module_product_expiry" class="oe_inline"/>
                                <label for="module_product_expiry"/>
                            </div>
                            <div>
                                <field name="group_stock_tracking_lot" class="oe_inline"/>
                                <label for="group_stock_tracking_lot"/>
                            </div>
                            <div>
                                <field name="group_stock_tracking_owner" class="oe_inline"/>
                                <label for="group_stock_tracking_owner"/>
                             </div>
                        </div>    
                    </group>
                    <separator string="Location &amp; Warehouse"/>
                    <group>
                        <label for="id" string="Logistic"/>
                        <div>
                            <div>
                                <field name="module_procurement_jit" class="oe_inline"/>
                                <label for="module_procurement_jit"/>
                            </div>
                            <div>
                                <field name="group_stock_multiple_locations" class="oe_inline"/>
                                <label for="group_stock_multiple_locations"/>  
                            </div>
                            <div>
                                <field name="group_stock_adv_location" class="oe_inline" on_change="onchange_adv_location(group_stock_adv_location)"/>
                                <label for="group_stock_adv_location"/>
                            </div>
                            <div attrs="{'invisible': [('group_stock_adv_location', '=', False)]}">
                                <label for="propagation_minimum_delta"/>
                                <field name="propagation_minimum_delta" class="oe_inline"/>
                            </div>
                        </div>
                    </group>
                    <group>
                        <label for="id" string="Products"/>
                        <div>
                            <div>
                                <field name="group_stock_packaging" class="oe_inline"/>
                                <label for="group_stock_packaging"/>
                            </div>
                             <div>
                                <label for="decimal_precision"/>
                                <field name="decimal_precision" class="oe_inline"/>
                            </div>
                            <div>
                                <field name="group_uom" class="oe_inline"/>
                                <label for="group_uom"/>
                            </div>
                            <div>
                                <field name="group_uos" class="oe_inline"/>
                                <label for="group_uos" />
                            </div>
                        </div>
                    </group>
                    <group>
                        <label for="id" string="Additional Features"/>
                            <div>
                                <div>
                                    <field name="module_claim_from_delivery" class="oe_inline"/>
                                    <label for="module_claim_from_delivery"/>
                                </div>
                                <div>
                                    <field name="module_stock_dropshipping" class="oe_inline"/>
                                    <label for="module_stock_dropshipping"/>
                                </div>
                                <div>
                                    <field name="module_stock_picking_wave" class="oe_inline"/>
                                    <label for="module_stock_picking_wave"/>
                                </div>
                            </div>
                    </group>
                </form>
            </field>
        </record>

        <record id="action_stock_config_settings" model="ir.actions.act_window">
            <field name="name">Configure Warehouse</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">stock.config.settings</field>
            <field name="view_mode">form</field>
            <field name="target">inline</field>
        </record>

        <menuitem id="menu_stock_config_settings" name="Warehouse" parent="base.menu_config"
            sequence="5" action="action_stock_config_settings"/>

    </data>
</openerp>
