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.

216 lines
9.0 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="template_agreement_tree" model="ir.ui.view">
  4. <field name="name">agreement.tree (template version)</field>
  5. <field name="model">agreement</field>
  6. <field name="priority" eval="30"/>
  7. <field name="arch" type="xml">
  8. <tree string="Agreement Templates">
  9. <field name="code"/>
  10. <field name="name"/>
  11. <field name="agreement_type_id"/>
  12. </tree>
  13. </field>
  14. </record>
  15. <record id="template_agreement_form" model="ir.ui.view">
  16. <field name="name">agreement.form (template version)</field>
  17. <field name="model">agreement</field>
  18. <field name="priority" eval="30"/>
  19. <field name="arch" type="xml">
  20. <form string="Agreement Template">
  21. <div class="oe_button_box" name="button_box">
  22. <button name="toggle_active" type="object"
  23. class="oe_stat_button" icon="fa-archive">
  24. <field name="active" widget="boolean_button"
  25. options='{"terminology": "archive"}'/>
  26. </button>
  27. </div>
  28. <group name="main">
  29. <group name="left">
  30. <field name="name"/>
  31. <field name="partner_id" invisible='1'/>
  32. </group>
  33. <group name="right">
  34. <field name="code"/>
  35. <field name="company_id" groups="base.group_multi_company"/>
  36. <field name="is_template" invisible='1'/>
  37. <field name="is_customer_requirement" invisible='1'/>
  38. <field name="is_sale_agreement" invisible="1"/>
  39. </group>
  40. </group>
  41. <notebook name="agreement_condition">
  42. <!-- put the condition fields in pages here -->
  43. <page string="Sales Conditions" name="sale_condition">
  44. </page>
  45. </notebook>
  46. </form>
  47. </field>
  48. </record>
  49. <record id="customer_agreement_tree" model="ir.ui.view">
  50. <field name="name">agreement.tree (customer preferences)</field>
  51. <field name="model">agreement</field>
  52. <field name="priority" eval="30"/>
  53. <field name="arch" type="xml">
  54. <tree string="Customer Preferences">
  55. <field name="code"/>
  56. <field name="name"/>
  57. <field name="partner_id"/>
  58. </tree>
  59. </field>
  60. </record>
  61. <record id="customer_agreement_form" model="ir.ui.view">
  62. <field name="name">agreement.form (customer preferences)</field>
  63. <field name="model">agreement</field>
  64. <field name="priority" eval="30"/>
  65. <field name="arch" type="xml">
  66. <form string="Customer Preferences">
  67. <div class="oe_button_box" name="button_box">
  68. <button name="toggle_active" type="object"
  69. class="oe_stat_button" icon="fa-archive">
  70. <field name="active" widget="boolean_button"
  71. options='{"terminology": "archive"}'/>
  72. </button>
  73. </div>
  74. <group name="main">
  75. <group name="left">
  76. <field name="name"/>
  77. <field name="partner_id"/>
  78. </group>
  79. <group name="right">
  80. <field name="code"/>
  81. <field name="company_id" groups="base.group_multi_company"/>
  82. <field name="is_customer_requirement" invisible='1'/>
  83. </group>
  84. </group>
  85. <notebook name="customer_preferences">
  86. <!-- display the fields in there -->
  87. <page string="Customer Preferences" name="page1">
  88. </page>
  89. </notebook>
  90. </form>
  91. </field>
  92. </record>
  93. <!-- FIXME: needs merging with the template version -->
  94. <record id="agreement_form" model="ir.ui.view">
  95. <field name="name">agreement.form (sale order version)</field>
  96. <field name="model">agreement</field>
  97. <field name="inherit_id" ref="agreement.agreement_form"/>
  98. <field name="arch" type="xml">
  99. <field name="signature_date" position="attributes">
  100. <attribute name="invisible">1</attribute>
  101. </field>
  102. <field name="end_date" position="attributes">
  103. <attribute name="invisible">1</attribute>
  104. </field>
  105. <field name="start_date" position="attributes">
  106. <attribute name="invisible">1</attribute>
  107. </field>
  108. <xpath expr="//group[@name='main']" position="after">
  109. <group name="metadata">
  110. <group groups="base.group_no_one">
  111. <field name="is_template" invisible='1'/>
  112. <field name="is_sale_agreement" invisible="1"/>
  113. <field name="is_customer_requirement" invisible='1'/>
  114. </group>
  115. </group>
  116. </xpath>
  117. <field name="code" position="after">
  118. <field name="agreement_type_id" readonly="1"/>
  119. </field>
  120. <field name="code" position="attributes">
  121. <attribute name="invisible">1</attribute>
  122. </field>
  123. <field name="name" position="attributes">
  124. <attribute name="readonly">1</attribute>
  125. </field>
  126. <xpath expr="//notebook/page[@name='config']" position="before">
  127. <page string="Sales Conditions">
  128. </page>
  129. </xpath>
  130. </field>
  131. </record>
  132. <record id="agreement_tree" model="ir.ui.view">
  133. <field name="name">agreement.tree (sale order version)</field>
  134. <field name="model">agreement</field>
  135. <field name="inherit_id" ref="agreement.agreement_tree"/>
  136. <field name="arch" type="xml">
  137. <field name="signature_date" position="attributes">
  138. <attribute name="invisible">1</attribute>
  139. </field>
  140. <field name="end_date" position="attributes">
  141. <attribute name="invisible">1</attribute>
  142. </field>
  143. <field name="start_date" position="attributes">
  144. <attribute name="invisible">1</attribute>
  145. </field>
  146. </field>
  147. </record>
  148. <record id="agreement.agreement_action" model="ir.actions.act_window">
  149. <field name="name">Agreement Templates</field>
  150. <field name="res_model">agreement</field>
  151. <field name="view_mode">tree,form</field>
  152. <field name="domain">[('is_template', '=', 1)]</field>
  153. <field name="context">{"default_is_template": 1}</field>
  154. </record>
  155. <record model="ir.actions.act_window.view" id="agreement_action_form">
  156. <field name="sequence" eval="10"/>
  157. <field name="view_mode">form</field>
  158. <field name="view_id" ref="template_agreement_form"/>
  159. <field name="act_window_id" ref="agreement.agreement_action"/>
  160. </record>
  161. <record model="ir.actions.act_window.view" id="agreement_action_tree">
  162. <field name="sequence" eval="1"/>
  163. <field name="view_mode">tree</field>
  164. <field name="view_id" ref="template_agreement_tree"/>
  165. <field name="act_window_id" ref="agreement.agreement_action"/>
  166. </record>
  167. <record id="customer_agreement_action" model="ir.actions.act_window">
  168. <field name="name">Customer Requirements</field>
  169. <field name="res_model">agreement</field>
  170. <field name="view_mode">tree,form</field>
  171. <field name="domain">[("is_customer_requirement", "=", 1)]</field>
  172. <field name="context">{"default_is_customer_requirement": 1}</field>
  173. </record>
  174. <record model="ir.actions.act_window.view" id="customer_agreement_action_form">
  175. <field name="sequence" eval="10"/>
  176. <field name="view_mode">form</field>
  177. <field name="view_id" ref="customer_agreement_form"/>
  178. <field name="act_window_id" ref="customer_agreement_action"/>
  179. </record>
  180. <record model="ir.actions.act_window.view" id="customer_agreement_action_tree">
  181. <field name="sequence" eval="1"/>
  182. <field name="view_mode">tree</field>
  183. <field name="view_id" ref="customer_agreement_tree"/>
  184. <field name="act_window_id" ref="customer_agreement_action"/>
  185. </record>
  186. <menuitem id="service_definition_menu"
  187. string="Service Definition"
  188. parent="sale.menu_sale_config"
  189. sequence="100"
  190. />
  191. <menuitem id="agreement.agreement_menu"
  192. action="agreement.agreement_action"
  193. parent="service_definition_menu"
  194. sequence="10"/>
  195. <menuitem id="customer_agreement_menu"
  196. action="customer_agreement_action"
  197. parent="service_definition_menu"
  198. sequence="11"/>
  199. </odoo>