<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
    
         <record id="view_sales_config_sale_stock" model="ir.ui.view">
             <field name="name">sale settings</field>
             <field name="model">sale.config.settings</field>
             <field name="inherit_id" ref="sale.view_sales_config"/>
             <field name="arch" type="xml">
                 <data>
                     <xpath expr="//div[@name='Customer Features']" position="inside">
                         <div>
                              <field name="group_sale_delivery_address" class="oe_inline"/>
                              <label for="group_sale_delivery_address"/>
                         </div>
                     </xpath>
                     <xpath expr="//div[@name='group_invoice_so_lines']" position="replace">
                         <div>
                             <field name="group_invoice_so_lines" on_change="onchange_invoice_methods(group_invoice_so_lines, group_invoice_deli_orders)" class="oe_inline"/>
                             <label for="group_invoice_so_lines"/>
                         </div>
                     </xpath>
                     <xpath expr="//div[@name='timesheet']" position="before">
                         <div>
                             <field name="group_invoice_deli_orders" class="oe_inline" on_change="onchange_invoice_methods(group_invoice_so_lines, group_invoice_deli_orders)"/>
                             <label for="group_invoice_deli_orders"/>
                         </div>
                         <div>
                             <field name="task_work" class="oe_inline" on_change="onchange_task_work(task_work)"/>
                             <label for="task_work"/>
                         </div>
                     </xpath>
                     <xpath expr="//label[@string='Default Options']" position="replace">
                         <label for="id" string="Default Options" attrs="{'invisible':['|',('group_invoice_so_lines','=',False),('group_invoice_deli_orders','=',False),('group_invoice_so_lines','=',False), ('group_invoice_deli_orders','=',False),('task_work','=',False), ('module_account_analytic_analysis','=',False)]}"/>
                     </xpath>
                     <xpath expr="//div[@name='time_unit']" position="before">
                         <div attrs="{'invisible':['|',('group_invoice_so_lines','=',False),('group_invoice_deli_orders','=',False)],'required': ['|',('group_invoice_so_lines','=',True),('group_invoice_deli_orders','=',True)]}">
                             <label for="default_order_policy"/>
                             <field name="default_order_policy" class="oe_inline"/>
                         </div>
                         <div attrs="{'invisible':[('group_invoice_so_lines','=',False), ('group_invoice_deli_orders','=',False)]}">
                             <field name="module_delivery" class="oe_inline"/>
                             <label for="module_delivery"/>
                         </div>
                     </xpath> 
                     <group name='default_options' position="after">
                         <field name="module_project_timesheet" invisible="1"/>
                         <field name="module_project_mrp" invisible="1"/>
                     </group>
                     <div name='warehouse_features' position='inside'>
                         <div name='default_picking_policy' attrs="{'invisible':[('group_invoice_deli_orders','=',False)]}">
                             <field name="default_picking_policy" class="oe_inline"/>
                             <label for="default_picking_policy"/>
                         </div>
                     </div>
                     <div name='module_sale_journal' position="before">
                         <div>
                             <field name="group_mrp_properties" class="oe_inline"/>
                             <label for="group_mrp_properties"/>
                         </div>
                     </div>
                     <xpath expr="//div[@name='module_sale_margin']" position="before">
                         <div>
                             <field name="group_multiple_shops" class="oe_inline"/>
                             <label for="group_multiple_shops"/>
                         </div>
                     </xpath>
                     <field name="group_invoice_so_lines" position="replace">
                         <field name="group_invoice_so_lines" on_change="onchange_invoice_methods(group_invoice_so_lines, group_invoice_deli_orders)" class="oe_inline"/>
                     </field>
                     <xpath expr="//div[@name='time_unit']" position="replace">
                         <div attrs="{'invisible': [('task_work','=',False), ('module_account_analytic_analysis','=',False)],'required': ['|', ('task_work','=',True), ('module_account_analytic_analysis','=',True)]}">
                             <label for="time_unit"/>
                             <field name="time_unit" domain="[('category_id.name','=','Working Time')]" class="oe_inline"/>
                         </div>
                     </xpath>
                </data>
             </field>
         </record>

    </data>
</openerp>