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.

127 lines
6.8 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="gender" attrs="{'invisible':[('is_company','=',True)]}"/>
  30. </group>
  31. </xpath>
  32. <xpath expr="//page[@name='sales_purchases']" position='after'>
  33. <page string="Shares" name="share" attrs="{'invisible':[('member','=',False)]}" groups="easy_my_coop.group_energiris_user">
  34. <group>
  35. <field name="number_of_share"/>
  36. <field name="total_value"/>
  37. </group>
  38. <field name="share_ids">
  39. <tree>
  40. <field name="effective_date"/>
  41. <field name="share_short_name"/>
  42. <field name="share_number" sum="Total of shares"/>
  43. <field name="share_unit_price"/>
  44. <field name="total_amount_line" sum="Total subscribed amount"/>
  45. </tree>
  46. </field>
  47. </page>
  48. </xpath>
  49. </field>
  50. </record>
  51. <record id="view_partner_tree_easy_my_coop" model="ir.ui.view">
  52. <field name="name">res.partner.tree.easy_my_coop</field>
  53. <field name="model">res.partner</field>
  54. <field name="inherit_id" ref="base.view_partner_tree"/>
  55. <field name="arch" type="xml">
  56. <xpath expr="/tree/field[@name='display_name']" position='after'>
  57. <field name="cooperator_register_number" />
  58. <field name="cooperator_type"/>
  59. <field name="effective_date"/>
  60. </xpath>
  61. </field>
  62. </record>
  63. <record id="view_res_partner_filter_coop" model="ir.ui.view">
  64. <field name="name">res.partner.select</field>
  65. <field name="model">res.partner</field>
  66. <field name="inherit_id" ref="base.view_res_partner_filter"/>
  67. <field name="arch" type="xml">
  68. <xpath expr="//filter[@name='supplier']" position='after'>
  69. <filter string="Cooperators" name="cooperator" domain="[('cooperator','=',1)]" help="Cooperator Partners"/>
  70. </xpath>
  71. <filter name="salesperson" position="before">
  72. <filter name="Cooperator Type" context="{'group_by': 'cooperator_type'}"/>
  73. </filter>
  74. </field>
  75. </record>
  76. <menuitem name="Cooperators" id="menu_easy_my_coop_main_coop" parent="menu_main_easy_my_coop" sequence="5" />
  77. <record id="action_partner_cooperator_form" model="ir.actions.act_window">
  78. <field name="name">Cooperator</field>
  79. <field name="type">ir.actions.act_window</field>
  80. <field name="res_model">res.partner</field>
  81. <field name="view_type">form</field>
  82. <field name="view_mode">kanban,tree,form</field>
  83. <field name="domain">[('cooperator','=',True),('member','=',True),('old_member','=',False)]</field>
  84. <field name="context">{'default_cooperator':1, 'search_default_cooperator':1}</field>
  85. <field name="filter" eval="True"/>
  86. <field name="help" type="html">
  87. <p class="oe_view_nocontent_create">
  88. Click to add a contact in your address book.
  89. </p><p>
  90. OpenERP helps you easily track all activities related to
  91. a cooperator: discussions, history of business opportunities,
  92. documents, etc.
  93. </p>
  94. </field>
  95. </record>
  96. <menuitem id="menu_easy_my_coop_cooperator" name="Cooperators" parent="menu_easy_my_coop_main_coop" action="action_partner_cooperator_form" sequence="100"/>
  97. <record id="action_partner_cooperator_candidate_form" model="ir.actions.act_window">
  98. <field name="name">Cooperator</field>
  99. <field name="type">ir.actions.act_window</field>
  100. <field name="res_model">res.partner</field>
  101. <field name="view_type">form</field>
  102. <field name="view_mode">kanban,tree,form</field>
  103. <field name="domain">[('cooperator','=',True),('member','=',False),('old_member','=',False)]</field>
  104. <field name="context">{'default_cooperator':1, 'search_default_cooperator':1}</field>
  105. <field name="filter" eval="True"/>
  106. <field name="help" type="html">
  107. <p class="oe_view_nocontent_create">
  108. Click to add a contact in your address book.
  109. </p><p>
  110. OpenERP helps you easily track all activities related to
  111. a cooperator: discussions, history of business opportunities,
  112. documents, etc.
  113. </p>
  114. </field>
  115. </record>
  116. <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"/>
  117. </data>
  118. </openerp>