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.

71 lines
3.3 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>
  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. <label for="recurring_interval"/>
  30. <div>
  31. <field name="recurring_interval"
  32. class="oe_inline" nolabel="1"/>
  33. <field name="recurring_rule_type"
  34. class="oe_inline" nolabel="1"/>
  35. </div>
  36. </group>
  37. <group>
  38. <field name="recurring_invoicing_type"
  39. attrs="{'invisible': [('recurring_rule_type', '=', 'monthlylastday')]}"/>
  40. </group>
  41. </group>
  42. <group>
  43. <field name="is_auto_renew"/>
  44. <label for="auto_renew_interval" attrs="{'invisible': [('is_auto_renew', '=', False)],
  45. 'required':[('is_contract', '=', True)]}"/>
  46. <div attrs="{'invisible': [('is_auto_renew', '=', False)],
  47. 'required':[('is_auto_renew', '=', True)]}">
  48. <field name="auto_renew_interval"
  49. class="oe_inline" nolabel="1"/>
  50. <field name="auto_renew_rule_type"
  51. class="oe_inline" nolabel="1"/>
  52. </div>
  53. <label for="termination_notice_interval" attrs="{'invisible': [('is_auto_renew', '=', False)],
  54. 'required':[('is_contract', '=', True)]}"/>
  55. <div attrs="{'invisible': [('is_auto_renew', '=', False)],
  56. 'required':[('is_auto_renew', '=', True)]}">
  57. <field name="termination_notice_interval"
  58. class="oe_inline" nolabel="1"/>
  59. <field name="termination_notice_rule_type"
  60. class="oe_inline" nolabel="1"/>
  61. </div>
  62. </group>
  63. </page>
  64. </xpath>
  65. </field>
  66. </record>
  67. </odoo>