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.

163 lines
9.5 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <menuitem name="Easy-My Coop" id="menu_main_easy_my_coop" sequence="40" groups="easy_my_coop.group_energiris_user"/>
  5. <menuitem name="Subscription" id="menu_easy_my_coop_main_subscription" parent="menu_main_easy_my_coop" sequence="10" groups="easy_my_coop.group_energiris_manager"/>
  6. <menuitem name="Reporting" id="menu_easy_my_coop_main_reporting" parent="menu_main_easy_my_coop" sequence="40" groups="easy_my_coop.group_energiris_manager"/>
  7. <record id="subscription_request_tree" model="ir.ui.view">
  8. <field name="name">subscription.request.tree</field>
  9. <field name="model">subscription.request</field>
  10. <field name="arch" type="xml">
  11. <tree string="Cooperator Subscriptions Request" colors="red:validated == False; blue:state in ('draft');grey: state in ('done')">
  12. <field name="name"/>
  13. <field name="date" string="Request Date"/>
  14. <field name="type"/>
  15. <field name="share_short_name" string="Share Type"/>
  16. <field name="ordered_parts" string="Quantity" sum="Total ordered parts"/>
  17. <field name="subscription_amount" sum="Total amount"/>
  18. <field name="email"/>
  19. <field name="iban"/>
  20. <field name="partner_id"/>
  21. <field name="source"/>
  22. <field name="state"/>
  23. <field name="validated" invisible="True"/>
  24. <button type="object" name="validate_subscription_request" attrs="{'invisible':['|',('state','!=','draft'),('validated','=',False)]}" icon="STOCK_MEDIA_PLAY" />
  25. <button type="object" name="block_subscription_request" states="draft" groups="easy_my_coop.group_energiris_user" icon="gtk-cancel"/>
  26. <button type="object" name="unblock_subscription_request" states="block" groups="easy_my_coop.group_energiris_manager" icon="gtk-jump-to"/>
  27. </tree>
  28. </field>
  29. </record>
  30. <record id="subscription_request_form" model="ir.ui.view">
  31. <field name="name">subscription.request.form</field>
  32. <field name="model">subscription.request</field>
  33. <field name="arch" type="xml">
  34. <form string="Subscription Requests">
  35. <header>
  36. <button string="Validate" type="object" name="validate_subscription_request" attrs="{'invisible':['|',('state','not in',['draft','waiting']),('validated','=',False)]}"/>
  37. <button string="Waiting list" type="object" name="put_on_waiting_list" states="draft"/>
  38. <button string="Cancel" type="object" name="cancel_subscription_request" states="draft,done,block" groups="easy_my_coop.group_energiris_manager"/>
  39. <field name="state" widget="statusbar" statusbar_visible="draft,cancelled,done,failed"/>
  40. </header>
  41. <sheet>
  42. <group>
  43. <group>
  44. <field name="already_cooperator"/>
  45. <field name="is_company" groups="easy_my_coop.group_energiris_super_manager"/>
  46. <field name="is_operation" invisible="True"/>
  47. <field name="company_name" attrs="{'invisible':[('is_company','=',False)]}"/>
  48. <field name="company_email" attrs="{'invisible':[('is_company','=',False)]}"/>
  49. <field name="company_type" attrs="{'invisible':[('is_company','=',False)]}"/>
  50. <field name="company_register_number" attrs="{'invisible':[('is_company','=',False)]}"/>
  51. <field name="name"/>
  52. <field name="firstname"/>
  53. <field name="lastname"/>
  54. <field name="birthdate"/>
  55. <field name="gender"/>
  56. <field name="email"/>
  57. <field name="phone"/>
  58. <field name="contact_person_function" attrs="{'invisible':[('is_company','=',False)]}"/>
  59. <field name="no_registre"/>
  60. <field name="iban"/>
  61. <field name="address"/>
  62. <field name="zip_code"/>
  63. <field name="city"/>
  64. <field name="country_id"/>
  65. </group>
  66. <group>
  67. <field name="capital_release_request_date" groups="easy_my_coop.group_energiris_super_manager"/>
  68. <field name="date"/>
  69. <field name="source"/>
  70. <field name="ordered_parts"/>
  71. <field name="share_product_id"/>
  72. <field name="share_short_name"/>
  73. <field name="share_unit_price"/>
  74. <field name="subscription_amount"/>
  75. <field name="partner_id"/>
  76. <field name="type"/>
  77. <field name="lang"/>
  78. <field name="validated"/>
  79. <field name="skip_control_ng"/>
  80. </group>
  81. </group>
  82. <notebook>
  83. <page name="capital_release_request" string="Capital release request">
  84. <field name="capital_release_request"/>
  85. </page>
  86. </notebook>
  87. </sheet>
  88. </form>
  89. </field>
  90. </record>
  91. <record id="view_subscription_request_filter" model="ir.ui.view">
  92. <field name="name">Cooperator Subscription Search</field>
  93. <field name="model">subscription.request</field>
  94. <field name="arch" type="xml">
  95. <search string="Search Subscription Request">
  96. <field name="name"
  97. filter_domain="['|',('name','ilike',self),('email','ilike',self)]"/>
  98. <separator/>
  99. <filter string="draft" name="state_draft" domain="[('state','=','draft')]"/>
  100. <filter string="done" name="state_done" domain="[('state','=','done')]"/>
  101. <separator/>
  102. <filter string="Unvalid" name="Unvalid" domain="[('validated', '=', False)]"/>
  103. <group expand="0" name="group_by" string="Group By">
  104. <filter string="Request type" context="{'group_by' : 'type'}" />
  105. <!-- <filter string="Part type" context="{'group_by': 'share_short_name'}"/> -->
  106. <filter string="Date Month" context="{'group_by': 'date'}"/>
  107. </group>
  108. </search>
  109. </field>
  110. </record>
  111. <record id="subscription_request_action" model="ir.actions.act_window">
  112. <field name="name">Cooperator Subscription</field>
  113. <field name="res_model">subscription.request</field>
  114. <field name="view_type">form</field>
  115. <field name="domain">[('is_company','=',False),('is_operation','=',False)]</field>
  116. <field name="context">{'default_source':'manual'}</field>
  117. <field name="view_id" ref="subscription_request_tree"/>
  118. <field name="search_view_id" ref="view_subscription_request_filter"/>
  119. </record>
  120. <menuitem action="subscription_request_action" name="Cooperator Subscription" id="menu_easy_my_coop_subscription_request" parent="menu_easy_my_coop_main_subscription" sequence="10"/>
  121. <record id="company_subscription_request_tree" model="ir.ui.view">
  122. <field name="name">subscription.request.tree</field>
  123. <field name="model">subscription.request</field>
  124. <field name="arch" type="xml">
  125. <tree string="Company Cooperator Subscriptions Request" colors="red:validated == False; blue:state in ('draft');grey: state in ('done')">
  126. <field name="company_name"/>
  127. <field name="name"/>
  128. <field name="date" string="Request Date"/>
  129. <field name="type"/>
  130. <field name="share_short_name" string="Share Type"/>
  131. <field name="ordered_parts" string="Quantity" sum="Total ordered parts"/>
  132. <field name="subscription_amount" sum="Total amount"/>
  133. <field name="email"/>
  134. <field name="iban"/>
  135. <field name="partner_id"/>
  136. <field name="source"/>
  137. <field name="state"/>
  138. <field name="validated" invisible="True"/>
  139. <button type="object" name="validate_subscription_request" attrs="{'invisible':['|',('state','!=','draft'),('validated','=',False)]}" icon="STOCK_MEDIA_PLAY"/>
  140. <button type="object" name="block_subscription_request" states="draft" groups="easy_my_coop.group_energiris_user" icon="gtk-cancel"/>
  141. <button type="object" name="unblock_subscription_request" states="block" groups="easy_my_coop.group_energiris_manager" icon="gtk-jump-to"/>
  142. </tree>
  143. </field>
  144. </record>
  145. <record id="company_subscription_request_action" model="ir.actions.act_window">
  146. <field name="name">Company Subscription</field>
  147. <field name="res_model">subscription.request</field>
  148. <field name="view_type">form</field>
  149. <field name="domain">[('is_company','=',True),('is_operation','=',False)]</field>
  150. <field name="context">{'default_is_company': True,'default_source':'manual'}</field>
  151. <field name="view_id" ref="company_subscription_request_tree"/>
  152. <field name="search_view_id" ref="view_subscription_request_filter"/>
  153. </record>
  154. <menuitem action="company_subscription_request_action" name="Company Subscription" id="menu_easy_my_coop_company_subscription_request" parent="menu_easy_my_coop_main_subscription" sequence="12"/>
  155. </data>
  156. </openerp>