forked from OCA/l10n-italy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
account_invoice_view.xml
50 lines (48 loc) · 3.22 KB
/
account_invoice_view.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?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>