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.

111 lines
5.1 KiB

  1. <odoo>
  2. <record id="action_loan_issue_lines" model="ir.actions.act_window">
  3. <field name="name">Loans</field>
  4. <field name="res_model">loan.issue.line</field>
  5. <field name="view_type">form</field>
  6. <field name="view_mode">tree,form</field>
  7. </record>
  8. <record id="loan_issue_line_view_tree" model="ir.ui.view">
  9. <field name="name">loan_issue_line_view_tree</field>
  10. <field name="model">loan.issue.line</field>
  11. <field name="arch" type="xml">
  12. <tree string="Loans">
  13. <field name="partner_id"/>
  14. <field name="loan_issue_id"/>
  15. <field name="quantity"/>
  16. <field name="face_value"/>
  17. <field name="amount"/>
  18. <field name="date"/>
  19. <field name="state"/>
  20. </tree>
  21. </field>
  22. </record>
  23. <record id="view_loan_issue_line_form" model="ir.ui.view">
  24. <field name="name">loan.issue.line.form</field>
  25. <field name="model">loan.issue.line</field>
  26. <field name="arch" type="xml">
  27. <form string="Loan">
  28. <header>
  29. <button name="action_validate" string="Validate"
  30. type="object" states="draft"/>
  31. <button name="action_request_payment"
  32. string="Request Payment"
  33. type="object" states="subscribed"/>
  34. <button name="action_draft" string="Set to draft"
  35. type="object" states="cancelled"/>
  36. <button name="action_paid" string="Paid"
  37. type="object" states="waiting"/>
  38. <button name="action_cancel" string="Cancel" type="object"
  39. states="draft,subscribed,waiting"
  40. confirm="Are you sure you want to cancel this loan subscription ?"/>
  41. <button name="action_compute_interest" string="Compute interest"
  42. type="object" states="paid"/>
  43. <field name="state" widget="statusbar"/>
  44. </header>
  45. <sheet>
  46. <group>
  47. <group>
  48. <field name="partner_id"/>
  49. <field name="loan_issue_id"/>
  50. <field name="quantity"/>
  51. <field name="face_value"/>
  52. </group>
  53. <group>
  54. <field name="date"/>
  55. <field name="payment_date"/>
  56. <field name="reference"/>
  57. <field name="amount"/>
  58. </group>
  59. </group>
  60. <notebook>
  61. <page string="Interest lines">
  62. <field name="interest_lines">
  63. <tree delete="false" create="false">
  64. <field name="name"/>
  65. <field name="amount"/>
  66. <field name="accrued_amount"/>
  67. <field name="interest"/>
  68. <field name="accrued_interest"/>
  69. <field name="net_interest"/>
  70. <field name="taxes_amount"/>
  71. <field name="due_amount"/>
  72. <field name="due_date"/>
  73. <field name="state"/>
  74. </tree>
  75. </field>
  76. </page>
  77. </notebook>
  78. </sheet>
  79. </form>
  80. </field>
  81. </record>
  82. <record id="view_loan_issue_line_filter" model="ir.ui.view">
  83. <field name="name">Loans Search</field>
  84. <field name="model">loan.issue.line</field>
  85. <field name="arch" type="xml">
  86. <search string="Search Loans">
  87. <field name="name"/>
  88. <field name="partner_id"/>
  89. <field name="loan_issue_id"/>
  90. <separator/>
  91. <filter string="Draft" name="state_draft"
  92. domain="[('state','=','draft')]"/>
  93. <filter string="Paid" name="state_paid"
  94. domain="[('state','=','paid')]"/>
  95. <filter string="Done" name="state_done"
  96. domain="[('state','=','done')]"/>
  97. <filter string="Subscribed" name="state_subscribed"
  98. domain="[('state','=','subscribed')]"/>
  99. <group expand="0" name="group_by" string="Group By">
  100. <filter name="loan_issue_id" string="Loan Issue"
  101. context="{'group_by' : 'loan_issue_id'}"/>
  102. <filter name="date" string="Subscription Date"
  103. context="{'group_by': 'date'}"/>
  104. </group>
  105. </search>
  106. </field>
  107. </record>
  108. </odoo>