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.

101 lines
5.1 KiB

  1. <openerp>
  2. <data>
  3. <record id="operation_request_tree" model="ir.ui.view">
  4. <field name="name">operation.request.tree</field>
  5. <field name="model">operation.request</field>
  6. <field name="arch" type="xml">
  7. <tree string="Operation requests" colors="green:state in ('approved'); blue:state in ('draft');grey: state in ('done')">
  8. <field name="request_date"/>
  9. <field name="partner_id"/>
  10. <field name="operation_type"/>
  11. <field name="quantity"/>
  12. <field name="user_id"/>
  13. <field name="state"/>
  14. </tree>
  15. </field>
  16. </record>
  17. <record id="operation_request_form" model="ir.ui.view">
  18. <field name="name">operation.request.form</field>
  19. <field name="model">operation.request</field>
  20. <field name="arch" type="xml">
  21. <form string="Operation request">
  22. <header>
  23. <button string="Submit" type="object" name="submit_operation" states="draft"/>
  24. <button string="Approve" type="object" name="approve_operation" states="waiting"/>
  25. <button string="Refuse" type="object" name="refuse_operation" states="waiting"/>
  26. <button string="Cancel" type="object" name="cancel_operation" states="draft,waiting"/>
  27. <button string="Draft" type="object" name="reset_to_draft" states="waiting,cancelled"/>
  28. <button string="Execute" type="object" name="execute_operation" states="approved"/>
  29. <field name="state" widget="statusbar" statusbar_visible="draft,done,cancelled,refused" statusbar_colors='{"draft":"grey","done":"green","cancelled":"orange","refused":"red"}'/>
  30. </header>
  31. <sheet>
  32. <group>
  33. <group>
  34. <field name="request_date" attrs="{'readonly':[('state','!=','draft')]}"/>
  35. <field name="operation_type" attrs="{'readonly':[('state','!=','draft')]}"/>
  36. <field name="receiver_not_member" attrs="{'invisible':[('operation_type','!=','transfer')]}"/>
  37. <field name="partner_id" attrs="{'readonly':[('state','!=','draft')]}"/>
  38. <field name="partner_id_to" attrs="{'invisible':['|',('operation_type','!=','transfer'), ('receiver_not_member','=',True)]}"/>
  39. </group>
  40. <group>
  41. <field name="user_id"/>
  42. <field name="share_product_id" attrs="{'readonly':[('state','!=','draft')]}"/>
  43. <field name="share_short_name" readonly="True"/>
  44. <field name="quantity" attrs="{'readonly':[('state','!=','draft')]}"/>
  45. <field name="share_unit_price" readonly="True"/>
  46. <field name="subscription_amount" attrs="{'readonly':[('state','!=','draft')]}"/>
  47. </group>
  48. </group>
  49. <group>
  50. <field name="subscription_request" attrs="{'invisible':['|',('operation_type','!=','transfer'),('receiver_not_member','=',False)]}" context="{'default_is_operation': True, 'default_share_product_id': share_product_id}">
  51. <tree>
  52. <field name="name"/>
  53. <field name="no_registre"/>
  54. <field name="birthdate"/>
  55. <field name="phone"/>
  56. <field name="email"/>
  57. <field name="iban"/>
  58. </tree>
  59. <form string="Subscription Requests">
  60. <sheet>
  61. <group>
  62. <group>
  63. <field name="name"/>
  64. <field name="firstname"/>
  65. <field name="lastname"/>
  66. <field name="birthdate"/>
  67. <field name="gender"/>
  68. <field name="email"/>
  69. <field name="phone"/>
  70. <field name="no_registre"/>
  71. <field name="iban"/>
  72. </group>
  73. <group>
  74. <field name="address"/>
  75. <field name="zip_code"/>
  76. <field name="city"/>
  77. <field name="country_id"/>
  78. <field name="lang"/>
  79. <field name="validated"/>
  80. <field name="skip_control_ng"/>
  81. </group>
  82. </group>
  83. </sheet>
  84. </form>
  85. </field>
  86. </group>
  87. </sheet>
  88. </form>
  89. </field>
  90. </record>
  91. <record id="operation_request_action" model="ir.actions.act_window">
  92. <field name="name">Operation request</field>
  93. <field name="res_model">operation.request</field>
  94. <field name="view_type">form</field>
  95. <field name="view_id" ref="operation_request_tree"/>
  96. </record>
  97. <menuitem action="operation_request_action" name="Operation request" id="menu_easy_my_coop_operation_request" parent="menu_easy_my_coop_main_subscription" sequence="20" groups="easy_my_coop.group_energiris_manager"/>
  98. </data>
  99. </openerp>