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

    <!-- Adapt Customer Invoices to support bba structured communication -->   
    <record id="customer_invoice_bbacomm_form" model="ir.ui.view">
      <field name="name">account.invoice.form.inherit</field>
      <field name="model">account.invoice</field>
      <field name="inherit_id" ref="account.invoice_form"/>
      <field name="arch" type="xml">
        <field name="date_due" position="after">
              <field name="reference_type" nolabel="1"  attrs="{'readonly':[('state','!=','draft')]}"
                 on_change="generate_bbacomm(type,reference_type, partner_id,reference, context)"/>
              <field name="reference" nolabel="1"  attrs="{'readonly':[('state','!=','draft')]}"/>
        </field>
      </field>
    </record>

  </data>
</openerp>
