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.

86 lines
3.6 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- Agreement Appendix List View-->
  4. <record model="ir.ui.view" id="agreement_appendix_tree">
  5. <field name="name">Agreement Appendix Tree</field>
  6. <field name="model">agreement.appendix</field>
  7. <field name="arch" type="xml">
  8. <tree string="Appendices" 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 Appendix Form View -->
  18. <record model="ir.ui.view" id="agreement_appendix_form">
  19. <field name="name">Agreement Appendix Form</field>
  20. <field name="model">agreement.appendix</field>
  21. <field name="arch" type="xml">
  22. <form string="Appendix">
  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. <field name="content" widget="html"/>
  43. <group class="oe_edit_only">
  44. <field name="field_domain" widget="domain" nolabel="1"
  45. options="{'model': 'agreement.appendix',
  46. 'partial_use': True}" />
  47. <group>
  48. <field name="default_value"/>
  49. <field name="copyvalue"/>
  50. </group>
  51. <p>
  52. This section (on the left) allows you to add dynamic fields inside the content.
  53. <ol>
  54. <li>Select the field using the popup</li>
  55. <li>Enter the default value if the field is empty</li>
  56. <li>Copy and paste the placeholder expression in the content</li>
  57. </ol>
  58. </p>
  59. </group>
  60. </sheet>
  61. </form>
  62. </field>
  63. </record>
  64. <!-- Agreement Appendix Search View -->
  65. <record model="ir.ui.view" id="agreement_appendix_search">
  66. <field name="name">Agreement Appendix Search</field>
  67. <field name="model">agreement.appendix</field>
  68. <field name="arch" type="xml">
  69. <search>
  70. <filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
  71. </search>
  72. </field>
  73. </record>
  74. <!-- Actions opening views on models -->
  75. <record model="ir.actions.act_window" id="agreement_appendix_action">
  76. <field name="name">Appendices</field>
  77. <field name="res_model">agreement.appendix</field>
  78. <field name="view_mode">tree,form</field>
  79. </record>
  80. </odoo>