l10n_it_bill_of_entry/account_invoice_view.xml
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="invoice_supplier_form">
<field name="name">account.invoice.supplier.form</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='journal_id']" position="after">
<field name="customs_doc_type"
attrs="{'readonly': ['|',('state', '!=', 'draft'), ('forwarder_bill_of_entry_ids', '!=', [])]}"/>
</xpath>
<xpath expr="//notebook/page[@string='Payments']" position="after">
<page string="Customs"
attrs="{'invisible': [('customs_doc_type','=', False)]}">
<separator string="Bill of entries" colspan="4"
attrs="{'invisible': [('customs_doc_type','!=', 'supplier_invoice')]}"></separator>
<field name="supplier_bill_of_entry_ids"
attrs="{'invisible': [('customs_doc_type','!=', 'supplier_invoice')]}"/>
<separator string="Supplier invoices" colspan="4"
attrs="{'invisible': [('customs_doc_type','!=', 'bill_of_entry')]}"></separator>
<field name="supplier_invoice_ids"
attrs="{'invisible': [('customs_doc_type','!=', 'bill_of_entry')]}"
domain="[('customs_doc_type', '=', 'supplier_invoice')]"
context="{'default_customs_doc_type': 'supplier_invoice'}"/>
<group>
<field name="forwarder_invoice_id"
attrs="{'invisible': [('customs_doc_type','!=', 'bill_of_entry')]}"
domain="[('customs_doc_type','=', 'forwarder_invoice')]"
context="{'default_customs_doc_type': 'forwarder_invoice'}"/>
</group>
<separator string="Bill of entries" colspan="4"
attrs="{'invisible': [('customs_doc_type','!=', 'forwarder_invoice')]}"></separator>
<field name="forwarder_bill_of_entry_ids"
attrs="{'invisible': [('customs_doc_type','!=', 'forwarder_invoice')]}"/>
<group>
<field name="bill_of_entry_storno_id"
attrs="{'invisible': [('customs_doc_type','!=', 'forwarder_invoice')]}"/>
</group>
<button string="Make Bill of Entry"
name="%(account_invoice_template.action_wizard_select_template)d"
type="action" class="oe_highlight"
attrs="{'invisible': ['|',('customs_doc_type','!=', 'forwarder_invoice'),('state','!=','draft')]}"/>
</page>
</xpath>
<xpath expr="//notebook/page[@string='Invoice']/field[@name='invoice_line']/tree/field[@name='price_subtotal']"
position="after">
<!--It seems attrs doesn't work -->
<field name="advance_customs_vat"/>
</xpath>
</field>
</record>
<record model="ir.ui.view" id="invoice_form_boe">
<field name="name">account.invoice.form.boe</field>
<field name="model">account.invoice.line</field>
<field name="inherit_id" ref="account.view_invoice_line_form"/>
<field name="arch" type="xml">
<field name="name" position="after">
<group>
<field name="advance_customs_vat"/>
</group>
</field>
</field>
</record>
</data>
</openerp>