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.

90 lines
3.9 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. <?xml version="1.0"?>
  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. <div class="oe_edit_only">
  46. <p>
  47. For dynamic content use mako expression '${expression}'. For ex:
  48. 1. object's field name: ${object.field_name} or
  49. 2. many2one field name: ${object.many2one_field_id.field_name}
  50. </p>
  51. </div>
  52. </page>
  53. <page string="Clauses">
  54. <field name="clauses_ids"
  55. nolabel="1"
  56. context="{'default_section_id': active_id, 'default_agreement_id': agreement_id}">
  57. <tree>
  58. <field name="sequence" widget="handle"/>
  59. <field name="name"/>
  60. <field name="title"/>
  61. </tree>
  62. </field>
  63. </page>
  64. </notebook>
  65. </sheet>
  66. </form>
  67. </field>
  68. </record>
  69. <!-- Agreement Section Search View -->
  70. <record model="ir.ui.view" id="partner_agreement_section_search_view">
  71. <field name="name">Agreement Section Search</field>
  72. <field name="model">agreement.section</field>
  73. <field name="arch" type="xml">
  74. <search string="Agreement Section Search">
  75. <filter name="group_agreement" string="Agreements" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
  76. </search>
  77. </field>
  78. </record>
  79. <!-- Actions opening views on models -->
  80. <record model="ir.actions.act_window" id="partner_agreement_action_section">
  81. <field name="name">Agreement Sections</field>
  82. <field name="res_model">agreement.section</field>
  83. <field name="view_mode">tree,form</field>
  84. </record>
  85. </odoo>