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.

128 lines
6.9 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" readonly="True" 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_super_manager"/>
  23. <field name="cooperator" groups="easy_my_coop.group_energiris_super_manager"/>
  24. <field name="member" groups="easy_my_coop.group_energiris_super_manager"/>
  25. <field name="cooperator_type" attrs="{'invisible':[('member','=',False)]}"/>
  26. <field name="effective_date" attrs="{'invisible':[('member','=',False)]}"/>
  27. </group>
  28. <group>
  29. <field name="birthdate" attrs="{'invisible':[('is_company','=',True)]}"/>
  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. </xpath>
  50. </field>
  51. </record>
  52. <record id="view_partner_tree_easy_my_coop" model="ir.ui.view">
  53. <field name="name">res.partner.tree.easy_my_coop</field>
  54. <field name="model">res.partner</field>
  55. <field name="inherit_id" ref="base.view_partner_tree"/>
  56. <field name="arch" type="xml">
  57. <xpath expr="/tree/field[@name='display_name']" position='after'>
  58. <field name="cooperator_register_number" />
  59. <field name="cooperator_type"/>
  60. <field name="effective_date"/>
  61. </xpath>
  62. </field>
  63. </record>
  64. <record id="view_res_partner_filter_coop" model="ir.ui.view">
  65. <field name="name">res.partner.select</field>
  66. <field name="model">res.partner</field>
  67. <field name="inherit_id" ref="base.view_res_partner_filter"/>
  68. <field name="arch" type="xml">
  69. <xpath expr="//filter[@name='supplier']" position='after'>
  70. <filter string="Cooperators" name="cooperator" domain="[('cooperator','=',1)]" help="Cooperator Partners"/>
  71. </xpath>
  72. <filter name="salesperson" position="before">
  73. <filter name="Cooperator Type" context="{'group_by': 'cooperator_type'}"/>
  74. </filter>
  75. </field>
  76. </record>
  77. <menuitem name="Cooperators" id="menu_easy_my_coop_main_coop" parent="menu_main_easy_my_coop" sequence="5" />
  78. <record id="action_partner_cooperator_form" model="ir.actions.act_window">
  79. <field name="name">Cooperator</field>
  80. <field name="type">ir.actions.act_window</field>
  81. <field name="res_model">res.partner</field>
  82. <field name="view_type">form</field>
  83. <field name="view_mode">kanban,tree,form</field>
  84. <field name="domain">[('cooperator','=',True),('member','=',True),('old_member','=',False)]</field>
  85. <field name="context">{'default_cooperator':1, 'search_default_cooperator':1}</field>
  86. <field name="filter" eval="True"/>
  87. <field name="help" type="html">
  88. <p class="oe_view_nocontent_create">
  89. Click to add a contact in your address book.
  90. </p><p>
  91. OpenERP helps you easily track all activities related to
  92. a cooperator: discussions, history of business opportunities,
  93. documents, etc.
  94. </p>
  95. </field>
  96. </record>
  97. <menuitem id="menu_easy_my_coop_cooperator" name="Cooperators" parent="menu_easy_my_coop_main_coop" action="action_partner_cooperator_form" sequence="100"/>
  98. <record id="action_partner_cooperator_candidate_form" model="ir.actions.act_window">
  99. <field name="name">Cooperator</field>
  100. <field name="type">ir.actions.act_window</field>
  101. <field name="res_model">res.partner</field>
  102. <field name="view_type">form</field>
  103. <field name="view_mode">kanban,tree,form</field>
  104. <field name="domain">[('cooperator','=',True),('member','=',False),('old_member','=',False)]</field>
  105. <field name="context">{'default_cooperator':1, 'search_default_cooperator':1}</field>
  106. <field name="filter" eval="True"/>
  107. <field name="help" type="html">
  108. <p class="oe_view_nocontent_create">
  109. Click to add a contact in your address book.
  110. </p><p>
  111. OpenERP helps you easily track all activities related to
  112. a cooperator: discussions, history of business opportunities,
  113. documents, etc.
  114. </p>
  115. </field>
  116. </record>
  117. <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"/>
  118. </data>
  119. </openerp>