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.

100 lines
4.6 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- Agreement Sections List View-->
  4. <record model="ir.ui.view" id="partner_agreement_section_list_view">
  5. <field name="name">Agreement Section List</field>
  6. <field name="model">agreement.section</field>
  7. <field name="arch" type="xml">
  8. <tree string="Sections" default_order='agreement_id, sequence'>
  9. <field name="sequence" widget="handle"/>
  10. <field name="name"/>
  11. <field name="title"/>
  12. <field name="agreement_id"/>
  13. <field name="active" invisible="1"/>
  14. </tree>
  15. </field>
  16. </record>
  17. <!-- Agreement Sections Form View -->
  18. <record model="ir.ui.view" id="partner_agreement_section_form_view">
  19. <field name="name">Agreement Section Form</field>
  20. <field name="model">agreement.section</field>
  21. <field name="arch" type="xml">
  22. <form string="Section">
  23. <sheet>
  24. <div class="oe_button_box" name="button_box">
  25. <button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
  26. <field name="active" widget="boolean_button" options="{&quot;terminology&quot;: &quot;archive&quot;}"/>
  27. </button>
  28. </div>
  29. <div class="oe_title">
  30. <label for="name" class="oe_edit_only"/>
  31. <h1><field name="name"/></h1>
  32. </div>
  33. <group>
  34. <group>
  35. <field name="title"/>
  36. <field name="agreement_id"/>
  37. </group>
  38. <group>
  39. <field name="sequence"/>
  40. </group>
  41. </group>
  42. <notebook>
  43. <page string="Content">
  44. <field name='content' nolabel="1"/>
  45. <group class="oe_edit_only">
  46. <field name="field_domain" widget="domain" nolabel="1"
  47. options="{'model': 'agreement.section',
  48. 'partial_use': True}" />
  49. <group>
  50. <field name="default_value"/>
  51. <field name="copyvalue"/>
  52. </group>
  53. <p>
  54. This section (on the left) allows you to add dynamic fields inside the content.
  55. <ol>
  56. <li>Select the field using the popup</li>
  57. <li>Enter the default value if the field is empty</li>
  58. <li>Copy and paste the placeholder expression in the content</li>
  59. </ol>
  60. </p>
  61. </group>
  62. </page>
  63. <page string="Clauses">
  64. <field name="clauses_ids"
  65. nolabel="1"
  66. context="{'default_section_id': active_id, 'default_agreement_id': agreement_id}">
  67. <tree>
  68. <field name="sequence" widget="handle"/>
  69. <field name="name"/>
  70. <field name="title"/>
  71. </tree>
  72. </field>
  73. </page>
  74. </notebook>
  75. </sheet>
  76. </form>
  77. </field>
  78. </record>
  79. <!-- Agreement Section Search View -->
  80. <record model="ir.ui.view" id="partner_agreement_section_search_view">
  81. <field name="name">Agreement Section Search</field>
  82. <field name="model">agreement.section</field>
  83. <field name="arch" type="xml">
  84. <search string="Agreement Section Search">
  85. <filter name="group_agreement" string="Agreements" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
  86. </search>
  87. </field>
  88. </record>
  89. <!-- Actions opening views on models -->
  90. <record model="ir.actions.act_window" id="partner_agreement_action_section">
  91. <field name="name">Agreement Sections</field>
  92. <field name="res_model">agreement.section</field>
  93. <field name="view_mode">tree,form</field>
  94. </record>
  95. </odoo>