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.

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