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

         <record id="view_partner_warning_form" model="ir.ui.view">
            <field name="name">res.partner.warning.form.inherit</field>
            <field name="model">res.partner</field>
            <field name="inherit_id" ref="base.view_partner_form"/>
            <field name="arch" type="xml">
                <notebook position="inside">
                    <page string="Warnings">
                        <group colspan="2" col="2">
                            <separator string="Warning on the Sales Order" colspan="4"/>
                                <field name="sale_warn" nolabel="1" />
                                <field name="sale_warn_msg" colspan="3" nolabel="1" 
                                        attrs="{'required':[('sale_warn','!=','no-message')],'readonly':[('sale_warn','=','no-message')]}"/>
                        </group>
                        <group colspan="2" col="2">
                            <separator string="Warning on the Purchase Order" colspan="4"/>
                            <field name="purchase_warn" nolabel="1" />
                            <field name="purchase_warn_msg" colspan="3" nolabel="1" 
                                    attrs="{'required':[('purchase_warn','!=','no-message')],'readonly':[('purchase_warn','=','no-message')]}"/>
                          </group>
                          <group colspan="2" col="2">
                            <separator string="Warning on the Picking" colspan="4"/>
                            <field name="picking_warn" nolabel="1" />
                            <field name="picking_warn_msg" colspan="3" nolabel="1" 
                                    attrs="{'required':[('picking_warn','!=','no-message')],'readonly':[('picking_warn','=','no-message')]}"/>
                        </group>
                        <group colspan="2" col="2">
                            <separator string="Warning on the Invoice" colspan="4"/>
                            <field name="invoice_warn" nolabel="1" />
                            <field name="invoice_warn_msg" colspan="3" nolabel="1" 
                                    attrs="{'required':[('invoice_warn','!=','no-message')],'readonly':[('invoice_warn','=','no-message')]}"/>
                        </group>
                    </page>
                </notebook>
            </field>
        </record>

        <record id="product_warning_form_view" model="ir.ui.view">
            <field name="name">product.warning.form.inherit</field>
            <field name="model">product.product</field>
            <field name="inherit_id" ref="product.product_normal_form_view"/>
            <field name="arch" type="xml">
                <notebook position="inside">
                    <page string="Warnings">
                        <group string="Warning when Selling this Product">
                            <field name="sale_line_warn"/>
                            <field name="sale_line_warn_msg"
                                    attrs="{'required':[('sale_line_warn','!=','no-message')],'readonly':[('sale_line_warn','=','no-message')]}"/>
                        </group>
                        <group string="Warning when Purchasing this Product">
                            <field name="purchase_line_warn"/>
                            <field name="purchase_line_warn_msg"
                                    attrs="{'required':[('purchase_line_warn','!=','no-message')],'readonly':[('purchase_line_warn','=','no-message')]}"/>
                        </group>
                    </page>
                </notebook>
            </field>
        </record>

    </data>
</openerp>
