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.

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