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.

78 lines
3.3 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 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. <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. </sheet>
  53. </form>
  54. </field>
  55. </record>
  56. <!-- Agreement Clause Search View -->
  57. <record model="ir.ui.view" id="agreement_clause_search_view">
  58. <field name="name">Agreement Clause Search</field>
  59. <field name="model">agreement.clause</field>
  60. <field name="arch" type="xml">
  61. <search string="Agreement Clause Search">
  62. <filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
  63. <filter name="group_section" icon="terp-partner" context="{'group_by':'section_id'}"/>
  64. </search>
  65. </field>
  66. </record>
  67. <!-- Actions opening views on models -->
  68. <record model="ir.actions.act_window" id="partner_agreement_action_clause">
  69. <field name="name">Clauses</field>
  70. <field name="res_model">agreement.clause</field>
  71. <field name="view_mode">tree,form</field>
  72. </record>
  73. </odoo>