mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
34 lines
1.3 KiB
XML
34 lines
1.3 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
<record id="contract_template_form_view" model="ir.ui.view">
|
|
<field name="name">Contract Template Variable Qty</field>
|
|
<field name="model">contract.template</field>
|
|
<field name="inherit_id" ref="contract.contract_template_form_view" />
|
|
<field name="arch" type="xml">
|
|
<xpath
|
|
expr="//field[@name='contract_line_ids']//field[@name='quantity']"
|
|
position="before"
|
|
>
|
|
<field name="qty_type" />
|
|
</xpath>
|
|
<xpath
|
|
expr="//field[@name='contract_line_ids']//field[@name='quantity']"
|
|
position="after"
|
|
>
|
|
<field
|
|
name="qty_formula_id"
|
|
required="qty_type == 'variable'"
|
|
invisible="qty_type != 'variable'"
|
|
/>
|
|
</xpath>
|
|
<xpath
|
|
expr="//field[@name='contract_line_ids']//field[@name='quantity']"
|
|
position="attributes"
|
|
>
|
|
<attribute name="required">"qty_type == 'fixed'"</attribute>
|
|
<attribute name="invisible">"qty_type != 'fixed'"</attribute>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo>
|