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.

37 lines
1.5 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright 2018 ACSONE SA/NV.
  4. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  5. -->
  6. <odoo>
  7. <record id="view_order_form" model="ir.ui.view">
  8. <field name="name">sale.order.form (in
  9. product_contract_variable_quantity)
  10. </field>
  11. <field name="model">sale.order</field>
  12. <field name="inherit_id" ref="sale.view_order_form"/>
  13. <field name="arch" type="xml">
  14. <xpath expr="//field[@name='order_line']/form//label[@for='name']"
  15. position="before">
  16. <group col="4">
  17. <field name="qty_type"
  18. attrs="{'required': [('is_contract', '=', True)], 'invisible': [('is_contract', '=', False)]}"/>
  19. <field name="qty_formula_id"
  20. attrs="{'required': [('qty_type', '=', 'variable')], 'invisible': [('qty_type', '!=', 'variable')]}"
  21. />
  22. </group>
  23. </xpath>
  24. <xpath expr="//field[@name='order_line']/tree//field[@name='product_uom_qty']"
  25. position="after">
  26. <field name="qty_type"
  27. attrs="{'column_invisible': [('parent.is_contract', '=', False)]}"/>
  28. <field name="qty_formula_id"
  29. attrs="{'column_invisible': [('parent.is_contract', '=', False)]}"/>
  30. </xpath>
  31. </field>
  32. </record>
  33. </odoo>