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.

175 lines
9.2 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  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_energiris_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_energiris_manager"/>
  15. </header>
  16. </sheet>
  17. <xpath expr="/form/sheet/group" position='before'>
  18. <group>
  19. <field name="representative" attrs="{'invisible':['|',('parent_id','=',False),('is_company','=',True)]}"/>
  20. <field name="cooperator_register_number" readonly="True" attrs="{'invisible':[('member','=',False)]}"/>
  21. <field name="legal_form" attrs="{'invisible':[('is_company','=',False)]}"/>
  22. <field name="company_register_number" readonly="True" attrs="{'invisible':[('is_company','=',False)]}"/>
  23. <field name="coop_candidate" groups="easy_my_coop.group_energiris_user"/>
  24. <field name="cooperator" invisible="True" groups="easy_my_coop.group_energiris_super_manager"/>
  25. <field name="member" groups="easy_my_coop.group_energiris_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 name="approvals">
  33. <field name="data_policy_approved" />
  34. <field name="internal_rules_approved" />
  35. <field name="financial_risk_approved" />
  36. </group>
  37. </xpath>
  38. <xpath expr="//page[@name='sales_purchases']" position='after'>
  39. <page string="Shares" name="share" attrs="{'invisible':[('member','=',False)]}" groups="easy_my_coop.group_energiris_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_energiris_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. </xpath>
  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="cooperator" domain="[('member','=',1)]" help="Cooperator Partners"/>
  88. </xpath>
  89. <filter name="salesperson" position="before">
  90. <filter name="Cooperator Type" context="{'group_by': 'cooperator_type'}"/>
  91. </filter>
  92. </field>
  93. </record>
  94. <menuitem name="Cooperators" id="menu_easy_my_coop_main_coop" parent="menu_main_easy_my_coop" sequence="5" />
  95. <record id="action_partner_cooperator_form" model="ir.actions.act_window">
  96. <field name="name">Cooperator</field>
  97. <field name="type">ir.actions.act_window</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','=',False)]</field>
  102. <field name="context">{'default_cooperator':1, 'search_default_cooperator':1}</field>
  103. <field name="filter" eval="True"/>
  104. <field name="help" type="html">
  105. <p class="oe_view_nocontent_create">
  106. Click to add a contact in your address book.
  107. </p><p>
  108. OpenERP helps you easily track all activities related to
  109. a cooperator: discussions, history of business opportunities,
  110. documents, etc.
  111. </p>
  112. </field>
  113. </record>
  114. <menuitem id="menu_easy_my_coop_cooperator" name="Cooperators" parent="menu_easy_my_coop_main_coop" action="action_partner_cooperator_form" sequence="100"/>
  115. <record id="action_partner_cooperator_candidate_form" model="ir.actions.act_window">
  116. <field name="name">Cooperator candidates</field>
  117. <field name="type">ir.actions.act_window</field>
  118. <field name="res_model">res.partner</field>
  119. <field name="view_type">form</field>
  120. <field name="view_mode">kanban,tree,form</field>
  121. <field name="domain">[('cooperator','=',True),('coop_candidate','=',True),('member','=',False)]</field>
  122. <field name="context">{'default_cooperator':1}</field>
  123. <field name="filter" eval="True"/>
  124. <field name="help" type="html">
  125. <p class="oe_view_nocontent_create">
  126. Click to add a contact in your address book.
  127. </p><p>
  128. OpenERP helps you easily track all activities related to
  129. a cooperator: discussions, history of business opportunities,
  130. documents, etc.
  131. </p>
  132. </field>
  133. </record>
  134. <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"/>
  135. <record id="action_company_representative_form" model="ir.actions.act_window">
  136. <field name="name">Company representative</field>
  137. <field name="type">ir.actions.act_window</field>
  138. <field name="res_model">res.partner</field>
  139. <field name="view_type">form</field>
  140. <field name="view_mode">kanban,tree,form</field>
  141. <field name="domain">[('cooperator','=',True),('representative','=',True)]</field>
  142. <field name="filter" eval="True"/>
  143. <field name="help" type="html">
  144. <p class="oe_view_nocontent_create">
  145. Click to add a contact in your address book.
  146. </p><p>
  147. OpenERP helps you easily track all activities related to
  148. a cooperator: discussions, history of business opportunities,
  149. documents, etc.
  150. </p>
  151. </field>
  152. </record>
  153. <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"/>
  154. <record id="remove_partner_follower" model="ir.ui.view">
  155. <field name="name">res.partner.remove.follower.inherit</field>
  156. <field name="model">res.partner</field>
  157. <field name="inherit_id" ref="mail.view_emails_partner_info_form"/>
  158. <field name="arch" type="xml">
  159. <field name="message_follower_ids" position="replace"/>
  160. </field>
  161. </record>
  162. </data>
  163. </openerp>