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.

240 lines
13 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" options="{'no_create':True}"/>
  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" widget="selection"/>
  72. <field name="share_short_name"/>
  73. <field name="share_unit_price"/>
  74. <field name="subscription_amount"/>
  75. <field name="partner_id" options="{'no_create':True}"/>
  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. <tree options="{'no_create':True}">
  86. <field string="Cooperator" name="partner_id"/>
  87. <field name="date_invoice"/>
  88. <field name="number"/>
  89. <field string="Reference" name="reference"/>
  90. <field name="date_due"/>
  91. <field name="amount_total_signed"/>
  92. <field name="residual_signed"/>
  93. <field name="state"/>
  94. </tree>
  95. </field>
  96. </page>
  97. </notebook>
  98. </sheet>
  99. </form>
  100. </field>
  101. </record>
  102. <record id="view_subscription_request_filter" model="ir.ui.view">
  103. <field name="name">Cooperator Subscription Search</field>
  104. <field name="model">subscription.request</field>
  105. <field name="arch" type="xml">
  106. <search string="Search Subscription Request">
  107. <field name="name"/>
  108. <separator/>
  109. <filter string="draft" name="state_draft" domain="[('state','=','draft')]"/>
  110. <filter string="done" name="state_done" domain="[('state','=','done')]"/>
  111. <separator/>
  112. <filter string="Unvalid" name="Unvalid" domain="[('validated', '=', False)]"/>
  113. <group expand="0" name="group_by" string="Group By">
  114. <filter string="Request type" context="{'group_by' : 'type'}" />
  115. <filter string="Date Month" context="{'group_by': 'date'}"/>
  116. </group>
  117. </search>
  118. </field>
  119. </record>
  120. <record id="subscription_request_action" model="ir.actions.act_window">
  121. <field name="name">Cooperator Subscription</field>
  122. <field name="res_model">subscription.request</field>
  123. <field name="view_type">form</field>
  124. <field name="domain">[('is_company','=',False),('is_operation','=',False)]</field>
  125. <field name="context">{'default_source':'manual'}</field>
  126. <field name="view_id" ref="subscription_request_tree"/>
  127. <field name="search_view_id" ref="view_subscription_request_filter"/>
  128. </record>
  129. <menuitem action="subscription_request_action" name="Cooperator Subscription" id="menu_easy_my_coop_subscription_request" parent="menu_easy_my_coop_main_subscription" sequence="10"/>
  130. <record id="company_subscription_request_tree" model="ir.ui.view">
  131. <field name="name">subscription.request.tree</field>
  132. <field name="model">subscription.request</field>
  133. <field name="arch" type="xml">
  134. <tree string="Company Cooperator Subscriptions Request" colors="red:validated == False; blue:state in ('draft');grey: state in ('done')">
  135. <field name="company_name"/>
  136. <field name="name"/>
  137. <field name="date" string="Request Date"/>
  138. <field name="type"/>
  139. <field name="share_short_name" string="Share Type"/>
  140. <field name="ordered_parts" string="Quantity" sum="Total ordered parts"/>
  141. <field name="subscription_amount" sum="Total amount"/>
  142. <field name="email"/>
  143. <field name="iban"/>
  144. <field name="partner_id"/>
  145. <field name="source"/>
  146. <field name="state"/>
  147. <field name="validated" invisible="True"/>
  148. <button type="object" name="validate_subscription_request" attrs="{'invisible':['|',('state','!=','draft'),('validated','=',False)]}" icon="STOCK_MEDIA_PLAY"/>
  149. <button type="object" name="block_subscription_request" states="draft" groups="easy_my_coop.group_energiris_user" icon="gtk-cancel"/>
  150. <button type="object" name="unblock_subscription_request" states="block" groups="easy_my_coop.group_energiris_manager" icon="gtk-jump-to"/>
  151. </tree>
  152. </field>
  153. </record>
  154. <record id="company_subscription_request_action" model="ir.actions.act_window">
  155. <field name="name">Company Subscription</field>
  156. <field name="res_model">subscription.request</field>
  157. <field name="view_type">form</field>
  158. <field name="domain">[('is_company','=',True),('is_operation','=',False)]</field>
  159. <field name="context">{'default_is_company': True,'default_source':'manual'}</field>
  160. <field name="view_id" ref="company_subscription_request_tree"/>
  161. <field name="search_view_id" ref="view_subscription_request_filter"/>
  162. </record>
  163. <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"/>
  164. <record id="share_line_form" model="ir.ui.view">
  165. <field name="name">share.line.form</field>
  166. <field name="model">share.line</field>
  167. <field name="arch" type="xml">
  168. <form string="Share line">
  169. <header>
  170. <button string="Update info" name="%(action_view_update_share_line_info)d"
  171. type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_energiris_super_manager"/>
  172. </header>
  173. <sheet>
  174. <group>
  175. <group>
  176. <field name="partner_id"/>
  177. <field name="share_product_id"/>
  178. <field name="share_number"/>
  179. </group>
  180. <group>
  181. <field name="share_short_name"/>
  182. <field name="share_unit_price"/>
  183. <field name="effective_date"/>
  184. <field name="total_amount_line"/>
  185. </group>
  186. </group>
  187. </sheet>
  188. </form>
  189. </field>
  190. </record>
  191. <record id="share_line_tree" model="ir.ui.view">
  192. <field name="name">share.line.tree</field>
  193. <field name="model">share.line</field>
  194. <field name="arch" type="xml">
  195. <tree>
  196. <field name="partner_id"/>
  197. <field name="share_product_id"/>
  198. <field name="share_number"/>
  199. <field name="share_short_name"/>
  200. <field name="share_unit_price"/>
  201. <field name="effective_date"/>
  202. <field name="total_amount_line"/>
  203. </tree>
  204. </field>
  205. </record>
  206. <record id="view_share_line_filter" model="ir.ui.view">
  207. <field name="name">Share Line Search</field>
  208. <field name="model">share.line</field>
  209. <field name="arch" type="xml">
  210. <search string="Search Share Line">
  211. <field name="partner_id"/>
  212. <field name="effective_date"/>
  213. <separator/>
  214. <group name="group_by" string="Group By">
  215. <filter string="Cooperator" context="{'group_by' : 'partner_id'}" />
  216. <filter string="Effective date" context="{'group_by': 'effective_date'}"/>
  217. </group>
  218. </search>
  219. </field>
  220. </record>
  221. <record id="share_line_action" model="ir.actions.act_window">
  222. <field name="name">Share Lines</field>
  223. <field name="res_model">share.line</field>
  224. <field name="view_type">form</field>
  225. </record>
  226. <menuitem action="share_line_action" name="Share lines" id="menu_easy_my_coop_share_line" parent="menu_easy_my_coop_main_subscription" sequence="20" groups="group_energiris_super_manager"/>
  227. </data>
  228. </openerp>