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.

254 lines
12 KiB

5 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="interest_payment" widget="selection"/>
  104. <field name="interest_payment_info"
  105. attrs="{'invisible':[('interest_payment','not in',['end','yearly'])]}"/>
  106. </group>
  107. </group>
  108. <notebook>
  109. <page name="lines" string="Lines">
  110. <field name="loan_issue_lines">
  111. <tree delete="false">
  112. <field name="name"/>
  113. <field name="partner_id"/>
  114. <field name="date"/>
  115. <field name="quantity"/>
  116. <field name="face_value"/>
  117. <field name="amount"/>
  118. <field name="state"/>
  119. <field name="company_currency_id"
  120. invisible="True"/>
  121. </tree>
  122. </field>
  123. </page>
  124. </notebook>
  125. </sheet>
  126. </form>
  127. </field>
  128. </record>
  129. <record id="view_loan_issue_filter" model="ir.ui.view">
  130. <field name="name">Loans Issue Search</field>
  131. <field name="model">loan.issue</field>
  132. <field name="arch" type="xml">
  133. <search string="Search Loan Issue">
  134. <field name="name"/>
  135. </search>
  136. </field>
  137. </record>
  138. <record id="action_loan_issue" model="ir.actions.act_window">
  139. <field name="name">Loan Issues</field>
  140. <field name="res_model">loan.issue</field>
  141. <field name="view_type">form</field>
  142. <field name="view_mode">tree,form</field>
  143. </record>
  144. <record id="action_loan_issue_lines" model="ir.actions.act_window">
  145. <field name="name">Loans</field>
  146. <field name="res_model">loan.issue.line</field>
  147. <field name="view_type">form</field>
  148. <field name="view_mode">tree,form</field>
  149. </record>
  150. <record id="loan_issue_line_view_tree" model="ir.ui.view">
  151. <field name="name">loan_issue_line_view_tree</field>
  152. <field name="model">loan.issue.line</field>
  153. <field name="arch" type="xml">
  154. <tree string="Loans">
  155. <field name="name"/>
  156. <field name="loan_issue_id"/>
  157. <field name="partner_id"/>
  158. <field name="quantity"/>
  159. <field name="face_value"/>
  160. <field name="amount"/>
  161. <field name="date"/>
  162. <field name="state"/>
  163. </tree>
  164. </field>
  165. </record>
  166. <record id="view_loan_issue_line_form" model="ir.ui.view">
  167. <field name="name">loan.issue.line.form</field>
  168. <field name="model">loan.issue.line</field>
  169. <field name="arch" type="xml">
  170. <form string="Loan issue">
  171. <header>
  172. <button name="action_validate" string="Validate"
  173. type="object" states="draft"/>
  174. <button name="action_request_payment"
  175. string="Request Payment"
  176. type="object" states="subscribed"/>
  177. <button name="action_cancel" string="Cancel" type="object"
  178. states="draft,subscribed,waiting"
  179. confirm="Are you sure you want to cancel this loan subscription ?"/>
  180. <button name="action_draft" string="Set to draft"
  181. type="object" states="cancelled"/>
  182. <button name="action_paid" string="Paid"
  183. type="object" states="waiting"/>
  184. <field name="state" widget="statusbar"/>
  185. </header>
  186. <sheet>
  187. <group>
  188. <group>
  189. <field name="loan_issue_id"/>
  190. <field name="name"/>
  191. <field name="quantity"/>
  192. <field name="face_value"/>
  193. </group>
  194. <group>
  195. <field name="date"/>
  196. <field name="partner_id"/>
  197. <field name="amount"/>
  198. </group>
  199. </group>
  200. <notebook>
  201. <page string="Interest lines">
  202. <field name="interest_lines">
  203. <tree delete="false" create="false">
  204. <field name="name"/>
  205. <field name="amount"/>
  206. <field name="accrued_amount"/>
  207. <field name="interest"/>
  208. <field name="net_interest"/>
  209. <field name="taxes_amount"/>
  210. <field name="due_date"/>
  211. <field name="state"/>
  212. </tree>
  213. </field>
  214. </page>
  215. </notebook>
  216. </sheet>
  217. </form>
  218. </field>
  219. </record>
  220. <record id="view_loan_issue_line_filter" model="ir.ui.view">
  221. <field name="name">Loans Search</field>
  222. <field name="model">loan.issue.line</field>
  223. <field name="arch" type="xml">
  224. <search string="Search Loans">
  225. <field name="name"/>
  226. <field name="partner_id"/>
  227. <field name="loan_issue_id"/>
  228. <separator/>
  229. <filter string="Draft" name="state_draft"
  230. domain="[('state','=','draft')]"/>
  231. <filter string="Paid" name="state_paid"
  232. domain="[('state','=','paid')]"/>
  233. <filter string="Done" name="state_done"
  234. domain="[('state','=','done')]"/>
  235. <filter string="Subscribed" name="state_subscribed"
  236. domain="[('state','=','subscribed')]"/>
  237. <group expand="0" name="group_by" string="Group By">
  238. <filter name="loan_issue_id" string="Loan Issue"
  239. context="{'group_by' : 'loan_issue_id'}"/>
  240. <filter name="date" string="Subscription Date"
  241. context="{'group_by': 'date'}"/>
  242. </group>
  243. </search>
  244. </field>
  245. </record>
  246. </odoo>