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.

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