[FIX] account, account_voucher: use new conventions in definition of form views
[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_highlight"/>
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                 <xpath expr="//button[@name='invoice_open']" position="after">
25                 <div>
26                     <button name="invoice_pay_customer" type="object" string="Pay" states="open" class="oe_highlight"/>
27                 </div>
28                 </xpath>
29             </field>
30         </record>
31     </data>
32 </openerp>