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.

86 lines
2.8 KiB

  1. # Copyright 2019 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. expense_account = fields.Many2one(
  29. "account.account",
  30. company_dependent=True,
  31. string="Expense 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_account = fields.Many2one(
  37. "account.account",
  38. company_dependent=True,
  39. string="Long Term Debt Account",
  40. help="This account is used to register the loan debt due for more"
  41. " than one year",
  42. required=True,
  43. )
  44. debt_short_term_account = fields.Many2one(
  45. "account.account",
  46. company_dependent=True,
  47. string="Short Term Debt Account",
  48. help="This account is used to register the loan debt due for the"
  49. " current fiscal year",
  50. required=True,
  51. old_name="debt_short_term_account",
  52. )
  53. interest_account = fields.Many2one(
  54. "account.account",
  55. company_dependent=True,
  56. string="Interest Account",
  57. help="This account is used to register the due loan interest",
  58. required=True,
  59. )
  60. tax_account = fields.Many2one(
  61. "account.account",
  62. company_dependent=True,
  63. string="Tax Account",
  64. help="This account is used to register the tax to pay"
  65. " to the tax administration",
  66. required=True,
  67. )
  68. awaiting_loan_payment_journal = fields.Many2one(
  69. "account.journal",
  70. string="Awaiting loan payment journal",
  71. help="This journal will be the default one as the"
  72. " to track the payment from the loaners",
  73. required=True,
  74. )
  75. loan_journal = fields.Many2one(
  76. "account.journal",
  77. string="Loan journal",
  78. help="This journal will be the one used to register all"
  79. " the loan account move lines",
  80. required=True,
  81. )