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.

59 lines
3.1 KiB

[ADD] bond and loan issues management [ADD] bond and loan issues management module skeleton [IMP] change increase menu sequence [IMP] add models, fields and views [IMP] add xml declaration in head of file [ADD] add easy_my_coop_loan_website - WIP [IMP] add access rights [IMP] this raise inconsistency so replace id by default_code. [IMP] change import openerp to odoo [IMP] add website loan module [FIX] put website display in loan [FIX] fix import [FIX] fix function [IMP] use correct name [IMP] make the loan and bond visible [IMP] add js, field and logic to set amount limit per subscription [IMP] remove dependency on recaptcha as user is logged to subscribe [IMP] add fields [IMP] save loan issue subscription still in WIP [IMP] remove alert pop up [IMP] add dependency to easy_my_coop_website [IMP] remove force send for sub request creation email notification [IMP] add mail templates [IMP] save subscription in the corresponding loan issue. add email notif [FIX] fix loan issue line view [FIX] add related field to loan issue. It is where the data stand [IMP] move term_view up [FIX] fix js error when false is returned [FIX] fix function when loan_issue_id in None [IMP] add actions and button [FIX] fix action [FIX] fix mail template [IMP] set noupdate=1 [IMP] change order [IMP] display loan issue lines on partner form [IMP] add loan view in partner form [IMP] add face value on loan issue and line add face value on loan issue and line. add as well the quantity and computation of the amount [FIX] missing id overriding values wasn't working [IMP] getting bond face value and setting it as step. [IMP] subscribed_amount computed field is the sum of the amount lines [IMP] allow a waiting payment to be cancelled [IMP] make field required [REFACT] move loan issue line code to dedicated file [IMP] add interest calculation and model [ADD] bond and loan issues management module skeleton [IMP] add models, fields and views [IMP] allow creation by hand [IMP] adding partner related field [IMP] put code in separate function [FIX] pass it to get method [IMP] routes consistent form [FIX] fix eof [FIX] GET is working for ajax call [IMP] website page for loan issue subscription
5 years ago
  1. from odoo import fields, models
  2. class LoanInterestLine(models.Model):
  3. _name = 'loan.interest.line'
  4. name = fields.Integer(string="Year",
  5. required=True)
  6. issue_line = fields.Many2one('loan.issue.line',
  7. string="Subscribed loan",
  8. required=True)
  9. partner_id = fields.Many2one(related='issue_line.partner_id',
  10. store=True,
  11. readlonly=True)
  12. amount = fields.Monetary(related='issue_line.amount',
  13. string="Subscribed amount",
  14. currency_field='company_currency_id',
  15. readonly=True)
  16. interest = fields.Monetary(string="Gross interest amount",
  17. currency_field='company_currency_id',
  18. readonly=True)
  19. net_interest = fields.Monetary(string="Net interest amount",
  20. currency_field='company_currency_id',
  21. readonly=True)
  22. taxes_rate = fields.Float(string="Taxes on interest",
  23. required=True)
  24. taxes_amount = fields.Monetary(string="Taxes amount",
  25. currency_field='company_currency_id',
  26. readonly=True)
  27. accrued_amount = fields.Monetary(string="Accrued amount",
  28. currency_field='company_currency_id',
  29. readonly=True)
  30. accrued_interest = fields.Monetary(string="Accrued gross interest",
  31. currency_field='company_currency_id',
  32. readonly=True)
  33. accrued_net_interest = fields.Monetary(
  34. string="Accrued net interest",
  35. currency_field='company_currency_id',
  36. readonly=True)
  37. accrued_taxes = fields.Monetary(string="Accrued taxes to pay",
  38. currency_field='company_currency_id',
  39. readonly=True)
  40. due_date = fields.Date(string="Due date")
  41. company_currency_id = fields.Many2one('res.currency',
  42. related='company_id.currency_id',
  43. string="Company Currency",
  44. readonly=True)
  45. company_id = fields.Many2one('res.company',
  46. related='issue_line.company_id',
  47. string="Company",
  48. readonly=True)
  49. state = fields.Selection([('draft', 'Draft'),
  50. ('due', 'Due'),
  51. ('requested', 'Payment requested'),
  52. ('donation', 'Donation'),
  53. ('paid', 'Paid')
  54. ],
  55. string="State",
  56. default="draft")