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.

167 lines
8.6 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 id="action_view_create_subscription" string="Create Subscription" name="%(action_view_create_subscription)d"
  16. type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_easy_my_coop_manager"/>
  17. <button id="action_view_update_partner_info" string="Update info" name="%(action_view_update_partner_info)d"
  18. type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_easy_my_coop_manager"/>
  19. </header>
  20. </sheet>
  21. <xpath expr="/form/sheet/group" position='before'>
  22. <group>
  23. <group>
  24. <field name="representative" attrs="{'invisible':['|',('parent_id','=',False),('is_company','=',True)]}"/>
  25. <field name="cooperator_register_number" readonly="True" attrs="{'invisible':[('member','=',False)]}"/>
  26. <field name="company_register_number" readonly="True" attrs="{'invisible':[('is_company','=',False)]}"/>
  27. <field name="coop_candidate" groups="easy_my_coop.group_easy_my_coop_user"/>
  28. <field name="cooperator" invisible="True" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
  29. <field name="member" groups="easy_my_coop.group_easy_my_coop_super_manager"/>
  30. <field name="cooperator_type" attrs="{'invisible':[('member','=',False)]}"/>
  31. <field name="effective_date" attrs="{'invisible':[('member','=',False)]}"/>
  32. </group>
  33. <group>
  34. <field name="gender" attrs="{'invisible':[('is_company','=',True)]}"/>
  35. </group>
  36. </group>
  37. </xpath>
  38. <page name='sales_purchases' position="after">
  39. <page string="Shares" name="share" attrs="{'invisible':[('member','=',False)]}" groups="easy_my_coop.group_easy_my_coop_user">
  40. <group>
  41. <field name="number_of_share"/>
  42. <field name="total_value"/>
  43. </group>
  44. <field name="share_ids">
  45. <tree create="false">
  46. <field name="effective_date"/>
  47. <field name="share_short_name"/>
  48. <field name="share_number" sum="Total of shares"/>
  49. <field name="share_unit_price"/>
  50. <field name="total_amount_line" sum="Total subscribed amount"/>
  51. </tree>
  52. </field>
  53. </page>
  54. <page string="Share subscriptions" name="share_subscription" attrs="{'invisible':[('cooperator','=',False)]}" groups="easy_my_coop.group_easy_my_coop_user">
  55. <field name="subscription_request_ids">
  56. <tree create="false" delete="false" edit="false">
  57. <field name="share_short_name"/>
  58. <field name="ordered_parts" sum="Total of shares"/>
  59. <field name="share_unit_price"/>
  60. <field name="subscription_amount" sum="Total subscribed amount"/>
  61. <field name="type"/>
  62. <field name="state"/>
  63. </tree>
  64. </field>
  65. </page>
  66. </page>
  67. </field>
  68. </record>
  69. <record id="view_partner_tree_easy_my_coop" model="ir.ui.view">
  70. <field name="name">res.partner.tree.easy_my_coop</field>
  71. <field name="model">res.partner</field>
  72. <field name="inherit_id" ref="base.view_partner_tree"/>
  73. <field name="arch" type="xml">
  74. <xpath expr="/tree/field[@name='display_name']" position='after'>
  75. <field name="cooperator_register_number" />
  76. <field name="cooperator_type"/>
  77. <field name="effective_date"/>
  78. </xpath>
  79. </field>
  80. </record>
  81. <record id="view_res_partner_filter_coop" model="ir.ui.view">
  82. <field name="name">res.partner.select</field>
  83. <field name="model">res.partner</field>
  84. <field name="inherit_id" ref="base.view_res_partner_filter"/>
  85. <field name="arch" type="xml">
  86. <xpath expr="//filter[@name='supplier']" position='after'>
  87. <filter string="Cooperators" name="cooperators" domain="[('member','=',1)]" help="Cooperator Partners"/>
  88. <filter string="Old Cooperators" name="old_cooperators" domain="[('old_member','=',1)]" help="Cooperator Partners"/>
  89. <filter string="Cooperator Candidates" name="cooperator_candidates" domain="[('coop_candidate','=',1)]" help="Cooperator Partners"/>
  90. </xpath>
  91. <filter name="salesperson" position="before">
  92. <filter name="Cooperator Type" context="{'group_by': 'cooperator_type'}"/>
  93. </filter>
  94. </field>
  95. </record>
  96. <record id="action_partner_cooperator_form" model="ir.actions.act_window">
  97. <field name="name">Cooperators</field>
  98. <field name="res_model">res.partner</field>
  99. <field name="view_type">form</field>
  100. <field name="view_mode">kanban,tree,form</field>
  101. <field name="domain">['|', ('cooperator','=',True), '|', ('member','=',True),('old_member','=', True)]</field>
  102. <field name="context">{'default_cooperator':1, 'search_default_cooperators':1}</field>
  103. <field name="help" type="html">
  104. <p class="oe_view_nocontent_create">
  105. Click to add a contact in your address book.
  106. </p><p>
  107. OpenERP helps you easily track all activities related to
  108. a cooperator: discussions, history of business opportunities,
  109. documents, etc.
  110. </p>
  111. </field>
  112. </record>
  113. <record id="action_partner_cooperator_candidate_form" model="ir.actions.act_window">
  114. <field name="name">Cooperator candidates</field>
  115. <field name="type">ir.actions.act_window</field>
  116. <field name="res_model">res.partner</field>
  117. <field name="view_type">form</field>
  118. <field name="view_mode">kanban,tree,form</field>
  119. <field name="domain">[('cooperator','=',True)]</field>
  120. <field name="context">{'default_cooperator':1, 'search_default_cooperator_candidates':1}</field>
  121. <field name="filter" eval="True"/>
  122. <field name="help" type="html">
  123. <p class="oe_view_nocontent_create">
  124. Click to add a contact in your address book.
  125. </p><p>
  126. OpenERP helps you easily track all activities related to
  127. a cooperator: discussions, history of business opportunities,
  128. documents, etc.
  129. </p>
  130. </field>
  131. </record>
  132. <record id="action_company_representative_form" model="ir.actions.act_window">
  133. <field name="name">Company representative</field>
  134. <field name="type">ir.actions.act_window</field>
  135. <field name="res_model">res.partner</field>
  136. <field name="view_type">form</field>
  137. <field name="view_mode">kanban,tree,form</field>
  138. <field name="domain">[('cooperator','=',True),('representative','=',True)]</field>
  139. <field name="filter" eval="True"/>
  140. <field name="help" type="html">
  141. <p class="oe_view_nocontent_create">
  142. Click to add a contact in your address book.
  143. </p><p>
  144. OpenERP helps you easily track all activities related to
  145. a cooperator: discussions, history of business opportunities,
  146. documents, etc.
  147. </p>
  148. </field>
  149. </record>
  150. <record id="remove_partner_follower" model="ir.ui.view">
  151. <field name="name">res.partner.remove.follower.inherit</field>
  152. <field name="model">res.partner</field>
  153. <field name="inherit_id" ref="mail.res_partner_view_form_inherit_mail"/>
  154. <field name="arch" type="xml">
  155. <field name="message_follower_ids" position="replace"/>
  156. </field>
  157. </record>
  158. </data>
  159. </odoo>