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.

92 lines
3.0 KiB

  1. # Copyright 2020 Coop IT Easy SCRL fs
  2. # Houssine Bakkali <houssine@coopiteasy.be>
  3. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
  4. from odoo import fields, models
  5. class ResCompany(models.Model):
  6. _inherit = "res.company"
  7. awaiting_loan_payment_account = fields.Many2one(
  8. "account.account",
  9. company_dependent=True,
  10. string="Awaiting Loan Payment Account",
  11. domain=[
  12. ("internal_type", "=", "receivable"),
  13. ("deprecated", "=", False),
  14. ],
  15. help="This account serve to track awaiting payment."
  16. " It only serve a bank reconciliation purpose to register the awaiting"
  17. " loan payment as received/paid",
  18. required=True,
  19. )
  20. loaner_account = fields.Many2one(
  21. "account.account",
  22. company_dependent=True,
  23. string="Loaner Account",
  24. help="This account will be the default one as the"
  25. " receivable account for the cooperators",
  26. required=True,
  27. )
  28. debt_long_term_account = fields.Many2one(
  29. "account.account",
  30. company_dependent=True,
  31. string="Long Term Debt Account",
  32. help="This account is used to register the loan debt due for more"
  33. " than one year",
  34. required=True,
  35. )
  36. debt_long_term_fy_account = fields.Many2one(
  37. "account.account",
  38. company_dependent=True,
  39. string="Long Term Debt Due In The Year Account",
  40. help="This account is used to register the loan debt due for the"
  41. " current fiscal year",
  42. required=True,
  43. )
  44. debt_long_term_due_account = fields.Many2one(
  45. "account.account",
  46. company_dependent=True,
  47. string="Long Term Debt Due Account",
  48. help="This account is used to register the loan debt due",
  49. required=True,
  50. )
  51. expense_account = fields.Many2one(
  52. "account.account",
  53. company_dependent=True,
  54. string="Expense Account",
  55. help="This account is used to register the prorata temporis interest"
  56. " amount at the end of the fiscal year",
  57. required=True,
  58. )
  59. interest_account = fields.Many2one(
  60. "account.account",
  61. company_dependent=True,
  62. string="Interest Account",
  63. help="This account is used to register the due loan interest",
  64. required=True,
  65. )
  66. tax_account = fields.Many2one(
  67. "account.account",
  68. company_dependent=True,
  69. string="Tax Account",
  70. help="This account is used to register the tax to pay"
  71. " to the tax administration",
  72. required=True,
  73. )
  74. awaiting_loan_payment_journal = fields.Many2one(
  75. "account.journal",
  76. string="Awaiting loan payment journal",
  77. help="This journal will be the default one as the"
  78. " to track the payment from the loaners",
  79. required=True,
  80. )
  81. loan_journal = fields.Many2one(
  82. "account.journal",
  83. string="Loan journal",
  84. help="This journal will be the one used to register all"
  85. " the loan account move lines",
  86. required=True,
  87. )