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.

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