1 <?xml version="1.0" encoding="UTF-8"?>
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"/>
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"/>