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.

87 lines
3.7 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- Agreement Recital List View-->
  4. <record model="ir.ui.view" id="agreement_recital_tree">
  5. <field name="name">Agreement Recital Tree</field>
  6. <field name="model">agreement.recital</field>
  7. <field name="arch" type="xml">
  8. <tree string="Recitals" 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 Recital Form View -->
  18. <record model="ir.ui.view" id="agreement_recital_form">
  19. <field name="name">Agreement Recital Form</field>
  20. <field name="model">agreement.recital</field>
  21. <field name="arch" type="xml">
  22. <form string="Recital">
  23. <sheet>
  24. <div class="oe_button_box" name="button_box">
  25. <button name="toggle_active" type="object"
  26. class="oe_stat_button" icon="fa-archive">
  27. <field name="active" widget="boolean_button"
  28. options="{&quot;terminology&quot;: &quot;archive&quot;}"/>
  29. </button>
  30. </div>
  31. <div class="oe_title">
  32. <label for="name" class="oe_edit_only"/>
  33. <h1><field name="name"/></h1>
  34. </div>
  35. <group>
  36. <group>
  37. <field name="title"/>
  38. <field name="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.recital',
  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 Recital Search View -->
  67. <record model="ir.ui.view" id="agreement_recital_search">
  68. <field name="name">Agreement Recital Search</field>
  69. <field name="model">agreement.recital</field>
  70. <field name="arch" type="xml">
  71. <search>
  72. <filter name="group_agreement" icon="terp-partner" context="{'group_by':'agreement_id'}"/>
  73. </search>
  74. </field>
  75. </record>
  76. <!-- Actions opening views on models -->
  77. <record model="ir.actions.act_window" id="agreement_recital_action">
  78. <field name="name">Recitals</field>
  79. <field name="res_model">agreement.recital</field>
  80. <field name="view_mode">tree,form</field>
  81. </record>
  82. </odoo>