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.

172 lines
9.1 KiB

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