purchase_advance_payment/views/purchase_order_views.xml

53 lines
2.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- Purchase Order Form View -->
<record id="view_purchase_order_form_inherit_advance_payment" model="ir.ui.view">
<field name="name">purchase.order.form.inherit.advance.payment</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<xpath expr="//sheet/group/group[2]" position="after">
<group>
<field name="deposit_product_id" invisible="1"/>
</group>
</xpath>
<xpath expr="//sheet/notebook" position="inside">
<page string="Advance Payments" name="advance_payments">
<group>
<group>
<field name="advance_payment_total" widget="monetary"/>
<field name="amount_residual" widget="monetary"/>
</group>
<group>
<button name="%(purchase_advance_payment.action_create_advance_payment_wizard)d"
string="Create Advance Payment"
type="action"
class="btn-primary"
context="{'default_purchase_order_id': active_id}"/>
</group>
</group>
<field name="advance_payment_ids" nolabel="1">
<tree create="false" delete="false">
<field name="name"/>
<field name="date"/>
<field name="amount" widget="monetary"/>
<field name="state"/>
<field name="journal_id"/>
</tree>
</field>
</page>
</xpath>
<xpath expr="//field[@name='order_line']/tree/field[@name='price_unit']" position="after">
<field name="is_deposit" invisible="1"/>
</xpath>
<xpath expr="//field[@name='order_line']/form//field[@name='price_unit']" position="after">
<field name="is_deposit" invisible="1"/>
</xpath>
</field>
</record>
</data>
</odoo>