[IMP] account_voucher : Register payment should be red when invoice is sent.
[odoo/odoo.git] / addons / account_voucher / account_voucher_pay_invoice.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <openerp>
3     <data>
4         <record id="view_invoice_customer" model="ir.ui.view">
5            <field name="name">account.invoice.customer.pay</field>
6            <field name="model">account.invoice</field>
7            <field name="type">form</field>
8            <field name="inherit_id" ref="account.invoice_form"/>
9            <field name="arch" type="xml">
10            <xpath expr="//button[@name='invoice_open']" position="after">
11                <div>
12                <button name="invoice_pay_customer" type="object" string="Register Payment" attrs="{'invisible':['|',('sent','=',True), ('state', '!=', 'open')]}"/>
13                <button name="invoice_pay_customer" type="object" string="Register Payment" attrs="{'invisible':['|',('sent','=',False), ('state', '!=', 'open')]}" class="oe_form_button_hi"/>
14                </div>
15            </xpath>
16            </field>
17         </record>
18         <record id="view_invoice_supplier" model="ir.ui.view">
19             <field name="name">account.invoice.supplier.pay</field>
20             <field name="model">account.invoice</field>
21             <field name="type">form</field>
22             <field name="inherit_id" ref="account.invoice_supplier_form"/>
23             <field name="arch" type="xml">
24                 <button name="invoice_open" position="after">
25                     <button name="invoice_pay_customer" type="object" string="Pay" states="open" icon="gtk-go-forward"/>
26                 </button>
27             </field>
28         </record>
29     </data>
30 </openerp>