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.

227 lines
11 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright 2019 Coop IT Easy
  4. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  5. -->
  6. <odoo>
  7. <data>
  8. <record id="view_partner_form_easy_my_coop" model="ir.ui.view">
  9. <field name="name">res.partner.form.easy_my_coop</field>
  10. <field name="model">res.partner</field>
  11. <field name="inherit_id" ref="base.view_partner_form"/>
  12. <field name="arch" type="xml">
  13. <sheet position="before">
  14. <header>
  15. <button string="Create Subscription"
  16. name="%(action_view_create_subscription)d"
  17. type="action"
  18. context="{'default_active_id': active_id}"
  19. groups="easy_my_coop.group_easy_my_coop_user"/>
  20. <button id="action_view_update_partner_info"
  21. string="Update info"
  22. name="%(action_view_update_partner_info)d"
  23. type="action"
  24. context="{'default_active_id': active_id}"
  25. groups="easy_my_coop.group_easy_my_coop_user"/>
  26. </header>
  27. </sheet>
  28. <xpath expr="/form/sheet/group" position='before'>
  29. <group>
  30. <group>
  31. <field name="member" invisible="1"/>
  32. <field name="representative"
  33. attrs="{'invisible':['|',('parent_id','=',False),('is_company','=',True)]}"/>
  34. <field name="cooperator_register_number"
  35. readonly="True"
  36. attrs="{'invisible':[('member','=',False)]}"/>
  37. <field name="company_register_number"
  38. readonly="True"
  39. attrs="{'invisible':[('is_company','=',False)]}"/>
  40. <field name="coop_candidate"
  41. groups="easy_my_coop.group_easy_my_coop_user"/>
  42. <field name="cooperator" invisible="True"
  43. groups="easy_my_coop.group_easy_my_coop_manager"/>
  44. <field name="member"
  45. groups="easy_my_coop.group_easy_my_coop_manager"/>
  46. <field name="cooperator_type"
  47. attrs="{'invisible':[('member','=',False)]}"/>
  48. <field name="effective_date"
  49. attrs="{'invisible':[('member','=',False)]}"/>
  50. </group>
  51. <group>
  52. <field name="gender"
  53. attrs="{'invisible':[('is_company','=',True)]}"/>
  54. </group>
  55. <group name="approvals">
  56. <field name="internal_rules_approved"
  57. attrs="{'invisible':[('member','=',False)]}"/>
  58. <field name="data_policy_approved"
  59. attrs="{'invisible':[('member','=',False)]}"/>
  60. <field name="financial_risk_approved"
  61. attrs="{'invisible':[('member','=',False)]}"/>
  62. </group>
  63. </group>
  64. </xpath>
  65. <page name='sales_purchases' position="after">
  66. <field name="member" invisible="1"/>
  67. <page string="Shares" name="share"
  68. attrs="{'invisible':[('member','=',False)]}"
  69. groups="easy_my_coop.group_easy_my_coop_user">
  70. <group>
  71. <field name="number_of_share"/>
  72. <field name="total_value"/>
  73. </group>
  74. <field name="share_ids">
  75. <tree create="false">
  76. <field name="effective_date"/>
  77. <field name="share_short_name"/>
  78. <field name="share_number"
  79. sum="Total of shares"/>
  80. <field name="share_unit_price"/>
  81. <field name="total_amount_line"
  82. sum="Total subscribed amount"/>
  83. </tree>
  84. </field>
  85. </page>
  86. <page string="Share subscriptions" name="share_subscription"
  87. attrs="{'invisible':[('cooperator','=',False)]}"
  88. groups="easy_my_coop.group_easy_my_coop_user">
  89. <field name="subscription_request_ids">
  90. <tree create="false" delete="false" edit="false">
  91. <field name="share_short_name"/>
  92. <field name="ordered_parts"
  93. sum="Total of shares"/>
  94. <field name="share_unit_price"/>
  95. <field name="subscription_amount"
  96. sum="Total subscribed amount"/>
  97. <field name="type"/>
  98. <field name="state"/>
  99. </tree>
  100. </field>
  101. </page>
  102. </page>
  103. </field>
  104. </record>
  105. <record id="view_partner_tree_easy_my_coop" model="ir.ui.view">
  106. <field name="name">res.partner.tree.easy_my_coop</field>
  107. <field name="model">res.partner</field>
  108. <field name="inherit_id" ref="base.view_partner_tree"/>
  109. <field name="arch" type="xml">
  110. <xpath expr="/tree/field[@name='display_name']"
  111. position='after'>
  112. <field name="cooperator_register_number"/>
  113. <field name="cooperator_type"/>
  114. <field name="effective_date"/>
  115. </xpath>
  116. </field>
  117. </record>
  118. <record id="view_res_partner_filter_coop" model="ir.ui.view">
  119. <field name="name">res.partner.select</field>
  120. <field name="model">res.partner</field>
  121. <field name="inherit_id" ref="base.view_res_partner_filter"/>
  122. <field name="arch" type="xml">
  123. <filter name="supplier" position='after'>
  124. <filter string="Cooperators" name="cooperators"
  125. domain="[('member','=',1)]"
  126. help="Cooperator Partners"/>
  127. <filter string="Old Cooperators" name="old_cooperators"
  128. domain="[('old_member','=',1)]"
  129. help="Cooperator Partners"/>
  130. <filter string="Cooperator Candidates"
  131. name="cooperator_candidates"
  132. domain="[('coop_candidate','=',1)]"
  133. help="Cooperator Partners"/>
  134. </filter>
  135. <filter name="salesperson" position="before">
  136. <filter string="Cooperator Type"
  137. name="group_by_cooperator_type"
  138. context="{'group_by': 'cooperator_type'}"/>
  139. </filter>
  140. </field>
  141. </record>
  142. <record id="action_partner_cooperator_form"
  143. model="ir.actions.act_window">
  144. <field name="name">Cooperators</field>
  145. <field name="res_model">res.partner</field>
  146. <field name="view_type">form</field>
  147. <field name="view_mode">kanban,tree,form</field>
  148. <field name="domain">['|', ('cooperator','=',True), '|', ('member','=',True),('old_member','=', True)]</field>
  149. <field name="context">{'default_cooperator':1, 'search_default_cooperators':1}</field>
  150. <field name="help" type="html">
  151. <p class="oe_view_nocontent_create">
  152. Click to add a contact in your address book.
  153. </p>
  154. <p>
  155. OpenERP helps you easily track all activities related to
  156. a cooperator: discussions, history of business
  157. opportunities,
  158. documents, etc.
  159. </p>
  160. </field>
  161. </record>
  162. <record id="action_partner_cooperator_candidate_form"
  163. model="ir.actions.act_window">
  164. <field name="name">Cooperator candidates</field>
  165. <field name="type">ir.actions.act_window</field>
  166. <field name="res_model">res.partner</field>
  167. <field name="view_type">form</field>
  168. <field name="view_mode">kanban,tree,form</field>
  169. <field name="domain">[('cooperator','=',True)]</field>
  170. <field name="context">{'default_cooperator':1,
  171. 'search_default_cooperator_candidates':1}
  172. </field>
  173. <field name="filter" eval="True"/>
  174. <field name="help" type="html">
  175. <p class="oe_view_nocontent_create">
  176. Click to add a contact in your address book.
  177. </p>
  178. <p>
  179. OpenERP helps you easily track all activities related to
  180. a cooperator: discussions, history of business
  181. opportunities,
  182. documents, etc.
  183. </p>
  184. </field>
  185. </record>
  186. <record id="action_company_representative_form"
  187. model="ir.actions.act_window">
  188. <field name="name">Company representative</field>
  189. <field name="type">ir.actions.act_window</field>
  190. <field name="res_model">res.partner</field>
  191. <field name="view_type">form</field>
  192. <field name="view_mode">kanban,tree,form</field>
  193. <field name="domain">[('representative_of_member_company','=',True)]</field>
  194. <field name="filter" eval="True"/>
  195. <field name="help" type="html">
  196. <p class="oe_view_nocontent_create">
  197. Click to add a contact in your address book.
  198. </p>
  199. <p>
  200. OpenERP helps you easily track all activities related to
  201. a cooperator: discussions, history of business
  202. opportunities,
  203. documents, etc.
  204. </p>
  205. </field>
  206. </record>
  207. <record id="remove_partner_follower" model="ir.ui.view">
  208. <field name="name">res.partner.remove.follower.inherit</field>
  209. <field name="model">res.partner</field>
  210. <field name="inherit_id"
  211. ref="mail.res_partner_view_form_inherit_mail"/>
  212. <field name="arch" type="xml">
  213. <field name="message_follower_ids" position="attributes">
  214. <attribute name="invisible">True</attribute>
  215. </field>
  216. </field>
  217. </record>
  218. </data>
  219. </odoo>