forked from OCA/account-financial-tools
-
Notifications
You must be signed in to change notification settings - Fork 1
/
invoice_view.xml
32 lines (27 loc) · 1.17 KB
/
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
<openerp>
<data>
<record id="invoice_form_customer_group_invoice" model="ir.ui.view">
<field name="name">Show Cancel invoice button customer</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_form" />
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="//button[@name='invoice_cancel']" position="attributes">
<attribute name="groups">account.group_account_invoice</attribute>
</xpath>
</field>
</record>
<!-- restore cancel button for open state -->
<record id="invoice_form_supplier_group_invoice" model="ir.ui.view">
<field name="name">Show Cancel invoice button supplier</field>
<field name="model">account.invoice</field>
<field name="inherit_id" ref="account.invoice_supplier_form" />
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="//button[@name='invoice_cancel']" position="after">
<button name="invoice_cancel" states="open" string="Cancel Invoice" groups="account.group_account_invoice"/>
</xpath>
</field>
</record>
</data>
</openerp>