view_account_payment.xml 2.43 KB
Newer Older
François C. committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
<?xml version="1.0"?>
<odoo>

    <record id="view_account_payment_tree_inherit" model="ir.ui.view">
        <field name="model">account.payment</field>
        <field name="inherit_id" ref="account.view_account_payment_tree"/>
        <field name="arch" type="xml">
            <field name="company_id" position="before">
                <field name="invoice_ids" />
            </field>
        </field>
    </record>

    <record id="view_account_supplier_payment_tree_inherit" model="ir.ui.view">
        <field name="model">account.payment</field>
        <field name="inherit_id" ref="account.view_account_supplier_payment_tree"/>
        <field name="arch" type="xml">
            <field name="company_id" position="before">
                <field name="invoice_ids" />
            </field>
        </field>
    </record>

    <record id="view_account_payment_tree_extend_inherit" model="ir.ui.view">
        <field name="model">account.payment</field>
        <field name="inherit_id" ref="account_payment_transfer_account.view_account_payment_tree_extend"/>
        <field name="arch" type="xml">
            <field name="company_id" position="before">
                <field name="invoice_ids" />
            </field>
        </field>
    </record>

    <record id="view_account_payment_form_extend_inherit" model="ir.ui.view">
        <field name="model">account.payment</field>
        <field name="inherit_id" ref="account_payment_transfer_account.view_account_payment_form_extend"/>
        <field name="arch" type="xml">
            <xpath expr="//button[@name='post']" position="after">
                <button type="object" class="oe_highlight" string="Reverse Payment"
                        name="reverse_payments" attrs="{'invisible':[('state','in',['draft', 'cancelled'])]}">
                </button>
                <button type="object" class="oe_highlight" string="Re-Generate"
                        name="re_generate" attrs="{'invisible':[('state','!=','cancelled')]}">
                </button>
            </xpath>
        </field>
    </record>

    <record id="account.action_account_payments_payable" model="ir.actions.act_window">
        <field name="context">{'default_payment_type': 'outbound', 'readonly_by_pass': True}</field>
    </record>

    <record id="account.action_account_payments" model="ir.actions.act_window">
        <field name="context">{'default_payment_type': 'inbound', 'readonly_by_pass': True}</field>
    </record>

</odoo>