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

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="account_analytic_invoice_line_view_tree"
  4. model="ir.ui.view">
  5. <field name="name">account.analytic.invoice.line.tree (in contract_variable_quantity)</field>
  6. <field name="model">account.analytic.invoice.line</field>
  7. <field name="inherit_id"
  8. ref="contract.account_analytic_invoice_line_view_tree"/>
  9. <field name="arch" type="xml">
  10. <xpath expr="//field[@name='quantity']" position="before">
  11. <field name="qty_type"/>
  12. </xpath>
  13. <xpath expr="//field[@name='quantity']" position="after">
  14. <field name="qty_formula_id"
  15. attrs="{'required': [('qty_type', '=', 'variable')], 'invisible': [('qty_type', '!=', 'variable')]}"
  16. />
  17. </xpath>
  18. <xpath expr="//field[@name='quantity']" position="attributes">
  19. <attribute name="attrs">{'required': [('qty_type', '=', 'fixed')], 'invisible': [('qty_type', '!=', 'fixed')]}</attribute>
  20. </xpath>
  21. </field>
  22. </record>
  23. </odoo>