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.

57 lines
2.5 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright 2017 LasLabs Inc.
  4. Copyright 2018 ACSONE SA/NV.
  5. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  6. -->
  7. <odoo>
  8. <record id="product_template_form_contract_view" model="ir.ui.view">
  9. <field name="name">account.invoice.select.contract</field>
  10. <field name="model">product.template</field>
  11. <field name="inherit_id" ref="product.product_template_form_view"/>
  12. <field name="arch" type="xml">
  13. <xpath expr="//div[@name='options']" position="inside">
  14. <div attrs="{'invisible': [('type', '!=', 'service')],}">
  15. <field name="is_contract"/>
  16. <label for="is_contract"/>
  17. </div>
  18. </xpath>
  19. <xpath expr="//notebook" position="inside">
  20. <page string="Contract"
  21. name="contract"
  22. attrs="{'invisible': [('is_contract', '=', False)],}">
  23. <group>
  24. <field name="contract_template_id"
  25. attrs="{'required':[('is_contract', '=', True)]}"/>
  26. </group>
  27. <group name="recurrence_info">
  28. <group>
  29. <field name="recurring_rule_type"/>
  30. </group>
  31. <group>
  32. <field name="default_qty"/>
  33. <field name="recurring_invoicing_type"
  34. attrs="{'invisible': [('recurring_rule_type', '=', 'monthlylastday')]}"/>
  35. </group>
  36. </group>
  37. <group>
  38. <field name="is_auto_renew"/>
  39. <label for="termination_notice_interval" attrs="{'invisible': [('is_auto_renew', '=', False)],
  40. 'required':[('is_contract', '=', True)]}"/>
  41. <div attrs="{'invisible': [('is_auto_renew', '=', False)],
  42. 'required':[('is_auto_renew', '=', True)]}">
  43. <field name="termination_notice_interval"
  44. class="oe_inline" nolabel="1"/>
  45. <field name="termination_notice_rule_type"
  46. class="oe_inline" nolabel="1"/>
  47. </div>
  48. </group>
  49. </page>
  50. </xpath>
  51. </field>
  52. </record>
  53. </odoo>