purchase_advance_payment/views/purchase_advance_payment_views.xml

34 lines
1.6 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>
<!-- Removed Link to PO button as per requirement -->
</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>