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.

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