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.

238 lines
12 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="subscription_request_tree" model="ir.ui.view">
  5. <field name="name">subscription.request.tree</field>
  6. <field name="model">subscription.request</field>
  7. <field name="arch" type="xml">
  8. <tree string="Cooperator Subscriptions Request" colors="red:validated == False; blue:state in ('draft');grey: state in ('done')">
  9. <field name="name"/>
  10. <field name="date" string="Request Date"/>
  11. <field name="type"/>
  12. <field name="share_short_name" string="Share Type"/>
  13. <field name="ordered_parts" string="Quantity" sum="Total ordered parts"/>
  14. <field name="subscription_amount" sum="Total amount"/>
  15. <field name="email"/>
  16. <field name="iban"/>
  17. <field name="partner_id"/>
  18. <field name="source"/>
  19. <field name="state"/>
  20. <field name="validated" invisible="True"/>
  21. <button type="object" name="validate_subscription_request" attrs="{'invisible':['|',('state','!=','draft'),('validated','=',False)]}" icon="STOCK_MEDIA_PLAY" />
  22. <button type="object" name="block_subscription_request" states="draft" groups="easy_my_coop.group_energiris_user" icon="gtk-cancel"/>
  23. <button type="object" name="unblock_subscription_request" states="block" groups="easy_my_coop.group_energiris_manager" icon="gtk-jump-to"/>
  24. </tree>
  25. </field>
  26. </record>
  27. <record id="subscription_request_form" model="ir.ui.view">
  28. <field name="name">subscription.request.form</field>
  29. <field name="model">subscription.request</field>
  30. <field name="arch" type="xml">
  31. <form string="Subscription Requests">
  32. <header>
  33. <button string="Validate" type="object" name="validate_subscription_request" attrs="{'invisible':['|',('state','not in',['draft','waiting']),('validated','=',False)]}"/>
  34. <button string="Waiting list" type="object" name="put_on_waiting_list" states="draft"/>
  35. <button string="Cancel" type="object" name="cancel_subscription_request" states="draft,done,block" groups="easy_my_coop.group_energiris_manager"/>
  36. <field name="state" widget="statusbar" statusbar_visible="draft,cancelled,done,failed"/>
  37. </header>
  38. <sheet>
  39. <group>
  40. <group>
  41. <field name="already_cooperator"/>
  42. <field name="is_company" groups="easy_my_coop.group_energiris_super_manager"/>
  43. <field name="is_operation" invisible="True"/>
  44. <field name="company_name" attrs="{'invisible':[('is_company','=',False)]}"/>
  45. <field name="company_email" attrs="{'invisible':[('is_company','=',False)]}"/>
  46. <field name="company_type" attrs="{'invisible':[('is_company','=',False)]}"/>
  47. <field name="company_register_number" attrs="{'invisible':[('is_company','=',False)]}"/>
  48. <field name="name"/>
  49. <field name="firstname"/>
  50. <field name="lastname"/>
  51. <field name="birthdate"/>
  52. <field name="gender"/>
  53. <field name="email"/>
  54. <field name="phone"/>
  55. <field name="contact_person_function" attrs="{'invisible':[('is_company','=',False)]}"/>
  56. <field name="iban"/>
  57. <field name="address"/>
  58. <field name="zip_code"/>
  59. <field name="city"/>
  60. <field name="country_id" options="{'no_create':True}"/>
  61. </group>
  62. <group>
  63. <field name="capital_release_request_date" groups="easy_my_coop.group_energiris_super_manager"/>
  64. <field name="date"/>
  65. <field name="source"/>
  66. <field name="ordered_parts"/>
  67. <field name="share_product_id" widget="selection"/>
  68. <field name="share_short_name"/>
  69. <field name="share_unit_price"/>
  70. <field name="subscription_amount"/>
  71. <field name="partner_id" options="{'no_create':True}"/>
  72. <field name="type"/>
  73. <field name="lang"/>
  74. <field name="validated"/>
  75. <field name="skip_control_ng"/>
  76. <field name="data_policy_approved"/>
  77. <field name="internal_rules_approved"/>
  78. <field name="financial_risk_approved"/>
  79. </group>
  80. </group>
  81. <notebook>
  82. <page name="capital_release_request" string="Capital release request">
  83. <field name="capital_release_request">
  84. <tree options="{'no_create':True}">
  85. <field string="Cooperator" name="partner_id"/>
  86. <field name="date_invoice"/>
  87. <field name="number"/>
  88. <field string="Reference" name="reference"/>
  89. <field name="date_due"/>
  90. <field name="amount_total_signed"/>
  91. <field name="residual_signed"/>
  92. <field name="state"/>
  93. </tree>
  94. </field>
  95. </page>
  96. </notebook>
  97. </sheet>
  98. </form>
  99. </field>
  100. </record>
  101. <record id="view_subscription_request_filter" model="ir.ui.view">
  102. <field name="name">Cooperator Subscription Search</field>
  103. <field name="model">subscription.request</field>
  104. <field name="arch" type="xml">
  105. <search string="Search Subscription Request">
  106. <field name="name"/>
  107. <separator/>
  108. <filter string="draft" name="state_draft" domain="[('state','=','draft')]"/>
  109. <filter string="done" name="state_done" domain="[('state','=','done')]"/>
  110. <separator/>
  111. <filter string="Unvalid" name="Unvalid" domain="[('validated', '=', False)]"/>
  112. <group expand="0" name="group_by" string="Group By">
  113. <filter string="Request type" context="{'group_by' : 'type'}" />
  114. <filter string="Date Month" context="{'group_by': 'date'}"/>
  115. </group>
  116. </search>
  117. </field>
  118. </record>
  119. <record id="subscription_request_action" model="ir.actions.act_window">
  120. <field name="name">Cooperator Subscription</field>
  121. <field name="res_model">subscription.request</field>
  122. <field name="view_type">form</field>
  123. <field name="domain">[('is_company','=',False),('is_operation','=',False)]</field>
  124. <field name="context">{'default_source':'manual'}</field>
  125. <field name="view_id" ref="subscription_request_tree"/>
  126. <field name="search_view_id" ref="view_subscription_request_filter"/>
  127. </record>
  128. <menuitem action="subscription_request_action" name="Cooperator Subscription" id="menu_easy_my_coop_subscription_request" parent="menu_easy_my_coop_main_subscription" sequence="10"/>
  129. <record id="company_subscription_request_tree" model="ir.ui.view">
  130. <field name="name">subscription.request.tree</field>
  131. <field name="model">subscription.request</field>
  132. <field name="arch" type="xml">
  133. <tree string="Company Cooperator Subscriptions Request" colors="red:validated == False; blue:state in ('draft');grey: state in ('done')">
  134. <field name="company_name"/>
  135. <field name="name"/>
  136. <field name="date" string="Request Date"/>
  137. <field name="type"/>
  138. <field name="share_short_name" string="Share Type"/>
  139. <field name="ordered_parts" string="Quantity" sum="Total ordered parts"/>
  140. <field name="subscription_amount" sum="Total amount"/>
  141. <field name="email"/>
  142. <field name="iban"/>
  143. <field name="partner_id"/>
  144. <field name="source"/>
  145. <field name="state"/>
  146. <field name="validated" invisible="True"/>
  147. <button type="object" name="validate_subscription_request" attrs="{'invisible':['|',('state','!=','draft'),('validated','=',False)]}" icon="STOCK_MEDIA_PLAY"/>
  148. <button type="object" name="block_subscription_request" states="draft" groups="easy_my_coop.group_energiris_user" icon="gtk-cancel"/>
  149. <button type="object" name="unblock_subscription_request" states="block" groups="easy_my_coop.group_energiris_manager" icon="gtk-jump-to"/>
  150. </tree>
  151. </field>
  152. </record>
  153. <record id="company_subscription_request_action" model="ir.actions.act_window">
  154. <field name="name">Company Subscription</field>
  155. <field name="res_model">subscription.request</field>
  156. <field name="view_type">form</field>
  157. <field name="domain">[('is_company','=',True),('is_operation','=',False)]</field>
  158. <field name="context">{'default_is_company': True,'default_source':'manual'}</field>
  159. <field name="view_id" ref="company_subscription_request_tree"/>
  160. <field name="search_view_id" ref="view_subscription_request_filter"/>
  161. </record>
  162. <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"/>
  163. <record id="share_line_form" model="ir.ui.view">
  164. <field name="name">share.line.form</field>
  165. <field name="model">share.line</field>
  166. <field name="arch" type="xml">
  167. <form string="Share line">
  168. <header>
  169. <button string="Update info" name="%(action_view_update_share_line_info)d"
  170. type="action" context="{'default_active_id': active_id}" groups="easy_my_coop.group_energiris_super_manager"/>
  171. </header>
  172. <sheet>
  173. <group>
  174. <group>
  175. <field name="partner_id"/>
  176. <field name="share_product_id"/>
  177. <field name="share_number"/>
  178. </group>
  179. <group>
  180. <field name="share_short_name"/>
  181. <field name="share_unit_price"/>
  182. <field name="effective_date"/>
  183. <field name="total_amount_line"/>
  184. </group>
  185. </group>
  186. </sheet>
  187. </form>
  188. </field>
  189. </record>
  190. <record id="share_line_tree" model="ir.ui.view">
  191. <field name="name">share.line.tree</field>
  192. <field name="model">share.line</field>
  193. <field name="arch" type="xml">
  194. <tree>
  195. <field name="partner_id"/>
  196. <field name="share_product_id"/>
  197. <field name="share_number"/>
  198. <field name="share_short_name"/>
  199. <field name="share_unit_price"/>
  200. <field name="effective_date"/>
  201. <field name="total_amount_line"/>
  202. </tree>
  203. </field>
  204. </record>
  205. <record id="view_share_line_filter" model="ir.ui.view">
  206. <field name="name">Share Line Search</field>
  207. <field name="model">share.line</field>
  208. <field name="arch" type="xml">
  209. <search string="Search Share Line">
  210. <field name="partner_id"/>
  211. <field name="effective_date"/>
  212. <separator/>
  213. <group name="group_by" string="Group By">
  214. <filter string="Cooperator" context="{'group_by' : 'partner_id'}" />
  215. <filter string="Effective date" context="{'group_by': 'effective_date'}"/>
  216. </group>
  217. </search>
  218. </field>
  219. </record>
  220. <record id="share_line_action" model="ir.actions.act_window">
  221. <field name="name">Share Lines</field>
  222. <field name="res_model">share.line</field>
  223. <field name="view_type">form</field>
  224. </record>
  225. <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"/>
  226. </data>
  227. </openerp>