[MERGE] trunk
[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'][last()]" position="after">
11                     <button name="invoice_pay_customer" type="object" string="Register Payment"
12                         attrs="{'invisible': ['|', ('state','!=','open'), ('sent','=',True)]}"/>
13                     <button name="invoice_pay_customer" type="object" string="Register Payment"
14                         attrs="{'invisible': ['|', ('state','!=','open'), ('sent','=',False)]}" class="oe_highlight"/>
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                 <xpath expr="//button[@name='invoice_open'][last()]" position="after">
25                     <button name="invoice_pay_customer" type="object" string="Pay" states="open" class="oe_highlight"/>
26                 </xpath>
27             </field>
28         </record>
29     </data>
30 </openerp>