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.

148 lines
7.5 KiB

4 years ago
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="view_loan_issue_tree" model="ir.ui.view">
  4. <field name="name">loan.issue.tree</field>
  5. <field name="model">loan.issue</field>
  6. <field name="arch" type="xml">
  7. <tree string="Loan issues">
  8. <field name="name"/>
  9. <field name="subscription_start_date"/>
  10. <field name="subscription_end_date"/>
  11. <field name="loan_start_date"/>
  12. <field name="term_date"/>
  13. <field name="loan_term"/>
  14. <field name="rate"/>
  15. <field name="minimum_amount"/>
  16. <field name="maximum_amount"/>
  17. <field name="subscribed_amount"/>
  18. <field name="user_id"/>
  19. <field name="state"/>
  20. </tree>
  21. </field>
  22. </record>
  23. <record id="view_loan_issue_form" model="ir.ui.view">
  24. <field name="name">loan.issue.form</field>
  25. <field name="model">loan.issue</field>
  26. <field name="arch" type="xml">
  27. <form string="Loan issue">
  28. <header>
  29. <!-- todo check access rights -->
  30. <button name="action_confirm" string="Confirm" type="object"
  31. states="draft"
  32. groups="easy_my_coop.group_easy_my_coop_manager"/>
  33. <button name="action_cancel" string="Cancel" type="object"
  34. states="draft,ongoing"
  35. confirm="Are you sure you want to cancel this loan issue?"
  36. groups="easy_my_coop.group_easy_my_coop_manager"/>
  37. <button name="action_open" string="Open" type="object"
  38. states="confirmed"
  39. groups="easy_my_coop.group_easy_my_coop_manager"/>
  40. <button name="action_close" string="Close" type="object"
  41. states="ongoing"
  42. confirm="Are you sure you want to close this loan issue?"
  43. groups="easy_my_coop.group_easy_my_coop_manager"/>
  44. <button name="action_draft" string="Set to draft"
  45. type="object" states="confirmed,cancelled"
  46. groups="easy_my_coop.group_easy_my_coop_manager"/>
  47. <button name="compute_loan_interest"
  48. string="Compute interest"
  49. type="object" states="closed,ongoing"
  50. groups="easy_my_coop.group_easy_my_coop_manager"/>
  51. <field name="state" widget="statusbar"
  52. statusbar_visible="draft,confirmed,ongoing,closed"/>
  53. </header>
  54. <sheet>
  55. <div class="oe_title">
  56. <label class="oe_edit_only" for="name" string="Name"/>
  57. <h1>
  58. <field name="name" placeholder="Loan issue Name"/>
  59. </h1>
  60. <div name="options">
  61. <div>
  62. <field name="display_on_website"/>
  63. <label for="display_on_website"/>
  64. </div>
  65. </div>
  66. </div>
  67. <group>
  68. <group>
  69. <field name="default_issue"/>
  70. <field name="face_value"/>
  71. <field name="minimum_amount"/>
  72. <field name="maximum_amount"/>
  73. <field name="subscribed_amount"/>
  74. <field name="by_individual"/>
  75. <field name="min_amount_person"
  76. attrs="{'invisible':[('by_individual','=',False)]}"/>
  77. <field name="max_amount_person"
  78. attrs="{'invisible':[('by_individual','=',False)]}"/>
  79. <field name="by_company"/>
  80. <field name="min_amount_company"
  81. attrs="{'invisible':[('by_company','=',False)]}"/>
  82. <field name="max_amount_company"
  83. attrs="{'invisible':[('by_company','=',False)]}"/>
  84. <field name="company_currency_id" invisible="True"/>
  85. </group>
  86. <group>
  87. <field name="user_id" widget="selection"/>
  88. <label for="rate" string="Interest rate"/>
  89. <div>
  90. <field name="rate" class="oe_inline"/>
  91. <span class="o_form_label oe_inline">%</span>
  92. </div>
  93. <label for="taxes_rate" string="Taxes on interest"/>
  94. <div>
  95. <field name="taxes_rate" class="oe_inline"/>
  96. <span class="o_form_label oe_inline">%</span>
  97. </div>
  98. <field name="subscription_start_date"/>
  99. <field name="subscription_end_date"/>
  100. <field name="loan_start_date"/>
  101. <field name="term_date"/>
  102. <field name="loan_term"/>
  103. <field name="capital_payment" widget="selection"/>
  104. <field name="interest_payment" widget="selection"/>
  105. <field name="interest_payment_info"
  106. attrs="{'invisible':[('interest_payment','not in',['end','yearly'])]}"/>
  107. </group>
  108. </group>
  109. <notebook>
  110. <page name="lines" string="Lines">
  111. <field name="loan_issue_lines" context="{'default_loan_issue_id': id}" attrs="{'readonly':[('state', '!=', 'ongoing')]}">
  112. <tree delete="false">
  113. <field name="name"/>
  114. <field name="partner_id"/>
  115. <field name="date"/>
  116. <field name="quantity"/>
  117. <field name="face_value"/>
  118. <field name="amount"/>
  119. <field name="state"/>
  120. <field name="company_currency_id"
  121. invisible="True"/>
  122. </tree>
  123. </field>
  124. </page>
  125. </notebook>
  126. </sheet>
  127. </form>
  128. </field>
  129. </record>
  130. <record id="view_loan_issue_filter" model="ir.ui.view">
  131. <field name="name">Loans Issue Search</field>
  132. <field name="model">loan.issue</field>
  133. <field name="arch" type="xml">
  134. <search string="Search Loan Issue">
  135. <field name="name"/>
  136. </search>
  137. </field>
  138. </record>
  139. <record id="action_loan_issue" model="ir.actions.act_window">
  140. <field name="name">Loan Issues</field>
  141. <field name="res_model">loan.issue</field>
  142. <field name="view_type">form</field>
  143. <field name="view_mode">tree,form</field>
  144. </record>
  145. </odoo>