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.

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