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.

230 lines
8.4 KiB

  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="term_date" />
  12. <field name="loan_term" />
  13. <field name="rate" />
  14. <field name="minimum_amount" />
  15. <field name="maximum_amount" />
  16. <field name="subscribed_amount" />
  17. <field name="user_id" />
  18. <field name="state" />
  19. </tree>
  20. </field>
  21. </record>
  22. <record id="view_loan_issue_form" model="ir.ui.view">
  23. <field name="name">loan.issue.form</field>
  24. <field name="model">loan.issue</field>
  25. <field name="arch" type="xml">
  26. <form string="Loan issue">
  27. <header>
  28. <!-- todo check access rights -->
  29. <button name="action_confirm" string="Confirm" type="object" states="draft"
  30. groups="easy_my_coop.group_easy_my_coop_manager"/>
  31. <button name="action_cancel" string="Cancel" type="object" states="draft,ongoing"
  32. confirm="Are you sure you want to cancel this loan issue?"
  33. groups="easy_my_coop.group_easy_my_coop_manager"/>
  34. <button name="action_open" string="Open" type="object"
  35. states="confirmed" groups="easy_my_coop.group_easy_my_coop_manager"/>
  36. <button name="action_close" string="Close" type="object" states="ongoing"
  37. confirm="Are you sure you want to close this loan issue?"
  38. groups="easy_my_coop.group_easy_my_coop_manager"/>
  39. <button name="action_draft" string="Set to draft"
  40. type="object" states="confirmed,cancelled"
  41. groups="easy_my_coop.group_easy_my_coop_manager"/>
  42. <button name="compute_loan_interest" string="Compute interest"
  43. type="object" states="closed,ongoing"
  44. groups="easy_my_coop.group_easy_my_coop_manager"/>
  45. <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,ongoing,closed"/>
  46. </header>
  47. <sheet>
  48. <div class="oe_button_box" name="button_box">
  49. <button name="toggle_display" type="object"
  50. class="oe_stat_button" icon="fa-globe">
  51. <field name="display_on_website" widget="website_button"/>
  52. </button>
  53. </div>
  54. <group>
  55. <group>
  56. <field name="name" />
  57. <field name="default_issue" />
  58. <field name="face_value" />
  59. <field name="minimum_amount" />
  60. <field name="maximum_amount" />
  61. <field name="subscribed_amount" />
  62. <field name="by_individual" />
  63. <field name="min_amount_person" attrs="{'invisible':[('by_individual','=',False)]}" />
  64. <field name="max_amount_person" attrs="{'invisible':[('by_individual','=',False)]}" />
  65. <field name="by_company" />
  66. <field name="min_amount_company" attrs="{'invisible':[('by_company','=',False)]}" />
  67. <field name="max_amount_company" attrs="{'invisible':[('by_company','=',False)]}" />
  68. <field name="company_currency_id" invisible="True" />
  69. </group>
  70. <group>
  71. <field name="user_id" widget="selection" />
  72. <label for="rate" string="Interest rate"/>
  73. <div>
  74. <field name="rate" class="oe_inline"/>
  75. <span class="o_form_label oe_inline">%</span>
  76. </div>
  77. <label for="taxes_rate" string="Taxes on interest"/>
  78. <div>
  79. <field name="taxes_rate" class="oe_inline"/>
  80. <span class="o_form_label oe_inline">%</span>
  81. </div>
  82. <field name="subscription_start_date" />
  83. <field name="subscription_end_date" />
  84. <field name="term_date" />
  85. <field name="loan_term" />
  86. <field name="interest_payment" widget="selection" />
  87. <field name="payment_date" attrs="{'invisible':[('interest_payment','!=','end')]}" />
  88. <field name="yearly_payement_on" attrs="{'invisible':[('interest_payment','!=','yearly')]}" />
  89. </group>
  90. </group>
  91. <notebook>
  92. <page name="lines" string="Lines">
  93. <field name="loan_issue_lines">
  94. <tree delete="false">
  95. <field name="name" />
  96. <field name="partner_id" />
  97. <field name="date" />
  98. <field name="quantity" />
  99. <field name="face_value" />
  100. <field name="amount" />
  101. <field name="state" />
  102. <field name="company_currency_id" invisible="True"/>
  103. </tree>
  104. </field>
  105. </page>
  106. </notebook>
  107. </sheet>
  108. </form>
  109. </field>
  110. </record>
  111. <record id="view_loan_issue_filter" model="ir.ui.view">
  112. <field name="name">Loans Issue Search</field>
  113. <field name="model">loan.issue</field>
  114. <field name="arch" type="xml">
  115. <search string="Search Loan Issue">
  116. <field name="name"/>
  117. </search>
  118. </field>
  119. </record>
  120. <record id="action_loan_issue" model="ir.actions.act_window">
  121. <field name="name">Loan Issues</field>
  122. <field name="res_model">loan.issue</field>
  123. <field name="view_type">form</field>
  124. <field name="view_mode">tree,form</field>
  125. </record>
  126. <record id="action_loan_issue_lines" model="ir.actions.act_window">
  127. <field name="name">Loans</field>
  128. <field name="res_model">loan.issue.line</field>
  129. <field name="view_type">form</field>
  130. <field name="view_mode">tree,form</field>
  131. </record>
  132. <record id="loan_issue_line_view_tree" model="ir.ui.view">
  133. <field name="name">loan_issue_line_view_tree</field>
  134. <field name="model">loan.issue.line</field>
  135. <field name="arch" type="xml">
  136. <tree string="Loans">
  137. <field name="name"/>
  138. <field name="loan_issue_id"/>
  139. <field name="partner_id"/>
  140. <field name="loan_issue_id"/>
  141. <field name="quantity"/>
  142. <field name="face_value"/>
  143. <field name="amount"/>
  144. <field name="date"/>
  145. <field name="state"/>
  146. </tree>
  147. </field>
  148. </record>
  149. <record id="view_loan_issue_line_form" model="ir.ui.view">
  150. <field name="name">loan.issue.line.form</field>
  151. <field name="model">loan.issue.line</field>
  152. <field name="arch" type="xml">
  153. <form string="Loan issue">
  154. <header>
  155. <button name="action_validate" string="Validate"
  156. type="object" states="draft" />
  157. <button name="action_request_payment" string="Request Payment"
  158. type="object" states="subscribed" />
  159. <button name="action_cancel" string="Cancel" type="object"
  160. states="draft,subscribed,waiting"
  161. confirm="Are you sure you want to cancel this loan subscription ?" />
  162. <button name="action_draft" string="Set to draft"
  163. type="object" states="cancelled" />
  164. <button name="action_paid" string="Paid"
  165. type="object" states="waiting" />
  166. <field name="state" widget="statusbar" />
  167. </header>
  168. <sheet>
  169. <group>
  170. <group>
  171. <field name="loan_issue_id"/>
  172. <field name="name" />
  173. <field name="quantity" />
  174. <field name="face_value" />
  175. </group>
  176. <group>
  177. <field name="date" />
  178. <field name="partner_id" />
  179. <field name="amount" />
  180. </group>
  181. </group>
  182. <notebook>
  183. <page string="Interest lines">
  184. <field name="interest_lines">
  185. <tree delete="false" create="false">
  186. <field name="name" />
  187. <field name="amount" />
  188. <field name="accrued_amount" />
  189. <field name="interest" />
  190. <field name="net_interest" />
  191. <field name="taxes_amount" />
  192. <field name="due_date" />
  193. <field name="state" />
  194. </tree>
  195. </field>
  196. </page>
  197. </notebook>
  198. </sheet>
  199. </form>
  200. </field>
  201. </record>
  202. <record id="view_loan_issue_line_filter" model="ir.ui.view">
  203. <field name="name">Loans Search</field>
  204. <field name="model">loan.issue.line</field>
  205. <field name="arch" type="xml">
  206. <search string="Search Loans">
  207. <field name="name"/>
  208. <field name="partner_id"/>
  209. <field name="loan_issue_id"/>
  210. <separator/>
  211. <filter string="Draft" name="state_draft" domain="[('state','=','draft')]"/>
  212. <filter string="Paid" name="state_paid" domain="[('state','=','paid')]"/>
  213. <filter string="Done" name="state_done" domain="[('state','=','done')]"/>
  214. <filter string="Subscribed" name="state_subscribed" domain="[('state','=','subscribed')]"/>
  215. <group expand="0" name="group_by" string="Group By">
  216. <filter name="loan_issue_id" string="Loan Issue" context="{'group_by' : 'loan_issue_id'}" />
  217. <filter name="date" string="Subscription Date" context="{'group_by': 'date'}"/>
  218. </group>
  219. </search>
  220. </field>
  221. </record>
  222. </odoo>