purchase_advance_payment/views/purchase_advance_payment_views.xml
2025-09-23 14:15:11 +07:00

40 lines
1.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- Account Payment Form View -->
<record id="view_account_payment_form_inherit_advance_payment" model="ir.ui.view">
<field name="name">account.payment.form.inherit.advance.payment</field>
<field name="model">account.payment</field>
<field name="inherit_id" ref="account.view_account_payment_form"/>
<field name="arch" type="xml">
<xpath expr="//sheet/group[2]" position="after">
<group>
<field name="is_advance_payment" invisible="1"/>
<field name="purchase_order_id"
invisible="not is_advance_payment"
required="is_advance_payment"/>
</group>
</xpath>
<xpath expr="//header" position="inside">
<button name="%(purchase_advance_payment.action_link_advance_payment_wizard_payment)d"
string="Link to PO"
type="action"
class="btn-primary"
invisible="state != 'draft' or is_advance_payment"/>
</xpath>
</field>
</record>
<!-- Account Payment Tree View -->
<record id="view_account_payment_tree_inherit_advance_payment" model="ir.ui.view">
<field name="name">account.payment.tree.inherit.advance.payment</field>
<field name="model">account.payment</field>
<field name="inherit_id" ref="account.view_account_payment_tree"/>
<field name="arch" type="xml">
<xpath expr="//tree/field[@name='partner_id']" position="after">
<field name="purchase_order_id"/>
</xpath>
</field>
</record>
</data>
</odoo>