You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

26 lines
1.1 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="account_analytic_invoice_line_view_tree"
model="ir.ui.view">
<field name="name">account.analytic.invoice.line.tree (in contract_variable_quantity)</field>
<field name="model">account.analytic.invoice.line</field>
<field name="inherit_id"
ref="contract.account_analytic_invoice_line_view_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='quantity']" position="before">
<field name="qty_type"/>
</xpath>
<xpath expr="//field[@name='quantity']" position="after">
<field name="qty_formula_id"
attrs="{'required': [('qty_type', '=', 'variable')], 'invisible': [('qty_type', '!=', 'variable')]}"
/>
</xpath>
<xpath expr="//field[@name='quantity']" position="attributes">
<attribute name="attrs">{'required': [('qty_type', '=', 'fixed')], 'invisible': [('qty_type', '!=', 'fixed')]}</attribute>
</xpath>
</field>
</record>
</odoo>