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.

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