forked from ecosoft-odoo/sqp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccount_invoice_view.xml
executable file
·41 lines (40 loc) · 2.31 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
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="invoice_form_ext" model="ir.ui.view">
<field name="name">invoice.form.ext</field>
<field name="model">account.invoice</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="/form" position="inside">
<field name="is_debitnote" invisible="True"/>
</xpath>
<xpath expr="/form/sheet/h1/label[@string='Draft Invoice ']" position="replace">
<label string="Draft Invoice " attrs="{'invisible': ['|','|',('state','not in',('draft',)), ('type','<>','out_invoice'), ('is_debitnote','<>',False)]}"/>
<label string="Draft Debit Note " attrs="{'invisible': ['|','|',('state','not in',('draft',)), ('type','<>','out_invoice'), ('is_debitnote','<>',True)]}"/>
</xpath>
<xpath expr="/form/sheet/h1/label[@string='Invoice ']" position="replace">
<label string="Invoice " attrs="{'invisible': ['|','|',('state','in',('draft','proforma','proforma2')), ('type','<>','out_invoice'), ('is_debitnote','<>',False)]}"/>
<label string="Debit Note " attrs="{'invisible': ['|','|',('state','in',('draft','proforma','proforma2')), ('type','<>','out_invoice'), ('is_debitnote','<>',True)]}"/>
</xpath>
<button name="%(account.action_account_invoice_refund)d" position="after">
<button name="%(action_account_debitnote)d" type='action' string='Debit Note' states='open,proforma2,paid' groups="base.group_user" />
</button>
</data>
</field>
</record>
<record id="invoice_supplier_form_ext" model="ir.ui.view">
<field name="name">invoice.supplier.ext</field>
<field name="model">account.invoice</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
<button name="%(account.action_account_invoice_refund)d" position="after">
<button name="%(action_account_debitnote)d" type='action' string='Debit Note' states='open,paid' groups="base.group_user" />
</button>
</field>
</record>
</data>
</openerp>