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.

60 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
[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. _description = "Loan Interest Line"
  5. name = fields.Integer(string="Year",
  6. required=True)
  7. issue_line = fields.Many2one('loan.issue.line',
  8. string="Subscribed loan",
  9. required=True)
  10. partner_id = fields.Many2one(related='issue_line.partner_id',
  11. store=True,
  12. readlonly=True)
  13. amount = fields.Monetary(related='issue_line.amount',
  14. string="Subscribed amount",
  15. currency_field='company_currency_id',
  16. readonly=True)
  17. interest = fields.Monetary(string="Gross interest amount",
  18. currency_field='company_currency_id',
  19. readonly=True)
  20. net_interest = fields.Monetary(string="Net interest amount",
  21. currency_field='company_currency_id',
  22. readonly=True)
  23. taxes_rate = fields.Float(string="Taxes on interest",
  24. required=True)
  25. taxes_amount = fields.Monetary(string="Taxes amount",
  26. currency_field='company_currency_id',
  27. readonly=True)
  28. accrued_amount = fields.Monetary(string="Accrued amount",
  29. currency_field='company_currency_id',
  30. readonly=True)
  31. accrued_interest = fields.Monetary(string="Accrued gross interest",
  32. currency_field='company_currency_id',
  33. readonly=True)
  34. accrued_net_interest = fields.Monetary(
  35. string="Accrued net interest",
  36. currency_field='company_currency_id',
  37. readonly=True)
  38. accrued_taxes = fields.Monetary(string="Accrued taxes to pay",
  39. currency_field='company_currency_id',
  40. readonly=True)
  41. due_date = fields.Date(string="Due date")
  42. company_currency_id = fields.Many2one('res.currency',
  43. related='company_id.currency_id',
  44. string="Company Currency",
  45. readonly=True)
  46. company_id = fields.Many2one('res.company',
  47. related='issue_line.company_id',
  48. string="Company",
  49. readonly=True)
  50. state = fields.Selection([('draft', 'Draft'),
  51. ('due', 'Due'),
  52. ('requested', 'Payment requested'),
  53. ('donation', 'Donation'),
  54. ('paid', 'Paid')
  55. ],
  56. string="State",
  57. default="draft")