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.

88 lines
3.9 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- Agreement Clause List View-->
  4. <record model="ir.ui.view" id="partner_agreement_clause_list_view">
  5. <field name="name">Agreement Clause List</field>
  6. <field name="model">agreement.clause</field>
  7. <field name="arch" type="xml">
  8. <tree string="Clauses" 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="section_id"/>
  14. <field name="active" invisible="1"/>
  15. </tree>
  16. </field>
  17. </record>
  18. <!-- Agreement Clause Form View -->
  19. <record model="ir.ui.view" id="partner_agreement_clause_form_view">
  20. <field name="name">Agreement clause Form</field>
  21. <field name="model">agreement.clause</field>
  22. <field name="arch" type="xml">
  23. <form string="Clause">
  24. <sheet>
  25. <div class="oe_button_box" name="button_box">
  26. <button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
  27. <field name="active" widget="boolean_button" options="{&quot;terminology&quot;: &quot;archive&quot;}"/>
  28. </button>
  29. </div>
  30. <div class="oe_title">
  31. <label for="name" class="oe_edit_only"/>
  32. <h1><field name="name"/></h1>
  33. </div>
  34. <group>
  35. <group>
  36. <field name="title"/>
  37. <field name="agreement_id"/>
  38. <field name="section_id" domain="[('agreement_id', '=', agreement_id)]"/>
  39. </group>
  40. <group>
  41. <field name="sequence"/>
  42. </group>
  43. </group>
  44. <field name="content" widget="html"/>
  45. <group class="oe_edit_only">
  46. <field name="field_domain" widget="domain" nolabel="1"
  47. options="{'model': 'agreement.clause',
  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. </sheet>
  63. </form>
  64. </field>
  65. </record>
  66. <!-- Agreement Clause Search View -->
  67. <record model="ir.ui.view" id="agreement_clause_search_view">
  68. <field name="name">Agreement Clause Search</field>
  69. <field name="model">agreement.clause</field>
  70. <field name="arch" type="xml">
  71. <search string="Agreement Clause Search">
  72. <filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
  73. <filter name="group_section" icon="terp-partner" context="{'group_by':'section_id'}"/>
  74. </search>
  75. </field>
  76. </record>
  77. <!-- Actions opening views on models -->
  78. <record model="ir.actions.act_window" id="partner_agreement_action_clause">
  79. <field name="name">Clauses</field>
  80. <field name="res_model">agreement.clause</field>
  81. <field name="view_mode">tree,form</field>
  82. </record>
  83. </odoo>