<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="invoice_supplier_cancel_form_inherit" model="ir.ui.view">
            <field name="name">invoice_auto_pay_cancel</field>
            <field name="model">account.invoice</field>
            <field name="inherit_id" ref="account_cancel.invoice_supplier_cancel_form_inherit"/>
            <field name="arch" type="xml">
                <button name="invoice_cancel" position="after">
                    <!-- New cancel button for paid invoices with autopay (no payments related) -->
                    <button name="invoice_cancel_paid" attrs="{'invisible':['|',('state','!=', 'paid'),('payment_ids', '!=', [(6, False, [])])]}" string="Cancel Invoice" groups="account.group_account_invoice"/>
                </button>
            </field>
        </record>
    </data>
</openerp>
<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="invoice_supplier_cancel_form_inherit" model="ir.ui.view">
            <field name="name">invoice_auto_pay_cancel</field>
            <field name="model">account.invoice</field>
            <field name="inherit_id" ref="account_cancel.invoice_supplier_cancel_form_inherit"/>
            <field name="arch" type="xml">
                <button name="invoice_cancel" position="after">
                    <!-- New cancel button for paid invoices with autopay (no payments related) -->
                    <button name="invoice_cancel_paid" attrs="{'invisible':['|',('state','!=', 'paid'),('payment_ids', '!=', [])]}" string="Cancel Invoice" groups="account.group_account_invoice"/>
                </button>
            </field>
        </record>
    </data>
</openerp>
FIX (6, False, []) for
FIX (6, False, []) for []
