Account Loan management

account_loan
REPOSITORY
REPOSITORYOCA/account-financial-tools
GIT
GIThttps://github.com/OCA/account-financial-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-financial-tools/tree/18.0/account_loan
VERSION
VERSION 1.0.2
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Creu Blanca
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Creu Blanca
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, juancarlosonate-tecnativa, Bhavesh Heliconia
WEBSITE
WEBSITEhttps://github.com/OCA/account-financial-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:07
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - html_editor
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES numpy-financial<=1.0.0
numpy>=1.15
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES libatlas-base-dev
DESCRIPTION
DESCRIPTION
This module extends the functionality of accounting to support loans. It
will create automatically moves or invoices for loans. Moreover, you can
check the pending amount to be paid and reduce the debt.

It currently supports two kinds of debts:

- Loans: a standard debt with banks, that only creates account moves.  
  Loan types info:
  [APR](https://en.wikipedia.org/wiki/Annual_percentage_rate),
  [EAR](https://en.wikipedia.org/wiki/Effective_interest_rate), [Real
  Rate](https://en.wikipedia.org/wiki/Real_interest_rate).

- Leases: a debt with a bank where purchase invoices are necessary

Code Analysis

Views touched (14)
XML IDNameModelTypeStatus
account_loan_form account.loan.form account.loan form New
account_loan_generate_wizard_form Pay amount account.loan.generate.wizard form New
account_loan_increase_amount_form_view account.loan.increase.amount.form (in account_loan) account.loan.increase.amount form New
account_loan_line_form account.loan.line.form account.loan.line form New
account_loan_line_tree account.loan.line.tree account.loan.line list New
account_loan_lines_view account.loan.lines.view account.loan.line list New
account_loan_pay_amount_form Pay amount account.loan.pay.amount form New
account_loan_pivot account.loan.pivot account.loan pivot New
account_loan_post_form Post loan account.loan.post form New
account_loan_search account.loan.tree account.loan search New
account_loan_tree account.loan.tree account.loan list New
res_partner_form_view res.partner.form (in account_loan) res.partner div Inherits base.view_partner_form
view_account_loan_lines_search Loan Items account.loan.line search New
view_move_form Add to_be_reversed and reversal_id fields account.move field Inherits account.view_move_form
Models touched (8)

New fields (35)
  • company_id Many2one → res.company
    default=_default_company required=True args: 'res.company'
  • currency_id Many2one → res.currency
    compute='_compute_currency' readonly=True args: 'res.currency'
  • fixed_amount Monetary
    compute='_compute_fixed_amount' currency_field='currency_id'
  • fixed_loan_amount Monetary
    copy=False currency_field='currency_id' default=0 readonly=True
  • fixed_periods Integer
    copy=False default=0 readonly=True
  • interest_expenses_account_id Many2one → account.account
    domain="[('company_ids', '=', company_id)]" help='Account where the interests will be assigned to' required=True string='Interests account' args: 'account.account'
  • interests_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id' string='Total interests payed'
  • interests_product_id Many2one → product.product
    help='Product where the amount of interests will be assigned when the invoice is created' string='Interest product' args: 'product.product'
  • is_leasing Boolean
  • journal_id Many2one → account.journal
    domain="[('company_id', '=', company_id),('type', '=', journal_type)]" required=True args: 'account.journal'
  • journal_type Char
    compute='_compute_journal_type'
  • leased_asset_account_id Many2one → account.account
    domain="[('company_ids', '=', company_id)]" args: 'account.account'
  • line_ids One2many → account.loan.line
    copy=False inverse_name='loan_id' readonly=True args: 'account.loan.line'
  • loan_amount Monetary
    currency_field='currency_id' required=True
  • loan_type Selection
    default='fixed-annuity' help='Method of computation of the period annuity' required=True args: [('fixed-annuity', 'Fixed Annuity'), ('fixed-annuity-begin', 'Fixed Annuity Begin'), ('fixed-principal', 'Fixed Principal'), ('interest', 'Only interest')]
  • long_term_loan_account_id Many2one → account.account
    domain="[('company_ids', '=', company_id)]" help='Account that will contain the pending amount on Long term' string='Long term account' args: 'account.account'
  • method_period Integer
    default=1 help='State here the time between 2 depreciations, in months' required=True string='Period Length'
  • move_count Integer
    compute='_compute_move_count'
  • move_ids One2many → account.move
    copy=False inverse_name='loan_id' args: 'account.move'
  • name Char
    copy=False default='/' required=True
  • partner_id Many2one → res.partner
    help='Company or individual that lends the money at an interest rate.' required=True string='Lender' args: 'res.partner'
  • payment_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id' string='Total payed amount'
  • payment_on_first_period Boolean
    help='When checked, the first payment will be on start date'
  • pending_principal_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id'
  • periods Integer
    help='Number of periods that the loan will last' required=True
  • post_invoice Boolean
    default=True help='Invoices will be posted automatically'
  • product_id Many2one → product.product
    help='Product where the amount of the loan will be assigned when the invoice is created' string='Loan product' args: 'product.product'
  • rate Float
    default=0.0 digits=(8, 6) help='Currently applied rate' required=True tracking=True
  • rate_period Float
    compute='_compute_rate_period' digits=(8, 6) help='Real rate that will be applied on each period'
  • rate_type Selection
    default='napr' help='Method of computation of the applied rate' required=True args: [('napr', 'Nominal APR'), ('ear', 'EAR'), ('real', 'Real rate')]
  • residual_amount Monetary
    currency_field='currency_id' default=0.0 help='Residual amount of the lease that must be payed on the end in order to acquire the asset' required=True
  • round_on_end Boolean
    help='When checked, the differences will be applied on the last period, if it is unchecked, the annuity will be recalculated on each period.'
  • short_term_loan_account_id Many2one → account.account
    domain="[('company_ids', '=', company_id)]" help='Account that will contain the pending amount on short term' required=True string='Short term account' args: 'account.account'
  • start_date Date
    copy=False help='Start of the moves'
  • state Selection
    copy=False default='draft' required=True args: [('draft', 'Draft'), ('posted', 'Posted'), ('cancelled', 'Cancelled'), ('closed', 'Closed')]
Public methods (7)
  • button_draft(self)
  • close(self)
  • compute_lines(self)
  • create(self, vals_list)
    @api.model_create_multi
  • post(self)
  • view_account_invoices(self)
  • view_account_moves(self)

New fields (2)
  • date Date
    default=fields.Date.context_today help='Choose the period for which you want to automatically post the depreciation lines of running assets' required=True args: 'Account Date'
  • loan_type Selection
    default='loan' required=True args: [('leasing', 'Leasings'), ('loan', 'Loans')]
Public methods (1)
  • run(self)

New fields (6)
  • account_id Many2one → account.account
    default=<expr> required=True args: 'account.account'
  • amount Monetary
    currency_field='currency_id' string='Amount to reduce from Principal'
  • currency_id Many2one → res.currency
    readonly=True related='loan_id.currency_id' args: 'res.currency'
  • date Date
    default=fields.Date.today() required=True
  • journal_id Many2one → account.journal
    default=<expr> required=True args: 'account.journal'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (2)
  • new_line_vals(self, sequence)
  • run(self)

New fields (25)
  • company_id Many2one → res.company
    related='loan_id.company_id' store=True args: 'res.company'
  • currency_id Many2one → res.currency
    related='loan_id.currency_id' args: 'res.currency'
  • date Date
    help='Date when the payment will be accounted' readonly=True required=True
  • final_pending_principal_amount Monetary
    compute='_compute_amounts' currency_field='currency_id' help='Pending amount of the loan after the payment' store=True
  • has_invoices Boolean
    compute='_compute_has_invoices'
  • has_moves Boolean
    compute='_compute_has_moves'
  • interest_expenses_account_id Many2one → account.account
    related='loan_id.interest_expenses_account_id' args: 'account.account'
  • interests_amount Monetary
    compute='_compute_interests_amount' currency_field='currency_id' help='Amount of the payment that will be assigned to interests' readonly=False store=True
  • is_leasing Boolean
    related='loan_id.is_leasing'
  • journal_id Many2one → account.journal
    related='loan_id.journal_id' args: 'account.journal'
  • loan_id Many2one → account.loan
    ondelete='cascade' readonly=True required=True args: 'account.loan'
  • loan_state Selection
    readonly=True related='loan_id.state' store=True
  • loan_type Selection
    related='loan_id.loan_type'
  • long_term_loan_account_id Many2one → account.account
    related='loan_id.long_term_loan_account_id' args: 'account.account'
  • long_term_pending_principal_amount Monetary
    currency_field='currency_id' help='Pending amount of the loan before the payment that will not be payed in, at least, 12 months' readonly=True
  • long_term_principal_amount Monetary
    currency_field='currency_id' help='Amount that will reduce the pending loan amount on long term' readonly=True
  • move_ids One2many → account.move
    inverse_name='loan_line_id' args: 'account.move'
  • name Char
    compute='_compute_name'
  • partner_id Many2one → res.partner
    related='loan_id.partner_id' args: 'res.partner'
  • payment_amount Monetary
    compute='_compute_payment_amount' currency_field='currency_id' help='Total amount that will be payed (Annuity)' readonly=False store=True
  • pending_principal_amount Monetary
    currency_field='currency_id' help='Pending amount of the loan before the payment' readonly=False
  • principal_amount Monetary
    compute='_compute_principal_amount' currency_field='currency_id' help='Amount of the payment that will reduce the pending loan amount' store=True
  • rate Float
    compute='_compute_rate' digits=(8, 6) readonly=False required=True store=True
  • sequence Integer
    readonly=True required=True
  • short_term_loan_account_id Many2one → account.account
    related='loan_id.short_term_loan_account_id' args: 'account.account'
Public methods (4)
  • view_account_invoices(self)
  • view_account_moves(self)
  • view_account_values(self)
    Shows the invoice if it is a leasing or the move if it is a loan
  • view_process_values(self)
    Computes the annuity and returns the result

New fields (6)
  • amount Monetary
    currency_field='currency_id' string='Amount to reduce from Principal'
  • cancel_loan Boolean
    default=False
  • currency_id Many2one → res.currency
    readonly=True related='loan_id.currency_id' args: 'res.currency'
  • date Date
    default=fields.Date.today() required=True
  • fees Monetary
    currency_field='currency_id' string='Bank fees'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (2)
  • new_line_vals(self, sequence)
  • run(self)

New fields (3)
  • account_id Many2one → account.account
    default=<expr> required=True args: 'account.account'
  • journal_id Many2one → account.journal
    default=<expr> required=True args: 'account.journal'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (3)
  • move_line_vals(self)
  • move_vals(self)
  • run(self)

New fields (2)
  • loan_id Many2one → account.loan
    ondelete='restrict' readonly=True store=True args: 'account.loan'
  • loan_line_id Many2one → account.loan.line
    ondelete='restrict' readonly=True args: 'account.loan.line'
Public methods (1)
  • action_post(self)

New fields (2)
  • lended_loan_count Integer
    compute='_compute_lended_loan_count' help='How many Loans this partner lended to us ?'
  • lended_loan_ids One2many → account.loan
    inverse_name='partner_id' args: 'account.loan'
Public methods (1)
  • action_view_partner_lended_loans(self)
REPOSITORY
REPOSITORYOCA/account-financial-tools
GIT
GIThttps://github.com/OCA/account-financial-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-financial-tools/tree/17.0/account_loan
VERSION
VERSION 2.2.1
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Creu Blanca
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Creu Blanca
COMMITTERS
COMMITTERSPedro M. Baeza, Víctor Martínez, Weblate, OCA-git-bot, oca-ci, daniel-chionne, juancarlosonate-tecnativa
WEBSITE
WEBSITEhttps://github.com/OCA/account-financial-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:01
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES numpy-financial<=1.0.0
numpy>=1.15
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES libatlas-base-dev
DESCRIPTION
DESCRIPTION
This module extends the functionality of accounting to support loans. It
will create automatically moves or invoices for loans. Moreover, you can
check the pending amount to be paid and reduce the debt.

It currently supports two kinds of debts:

- Loans: a standard debt with banks, that only creates account moves.  
  Loan types info:
  [APR](https://en.wikipedia.org/wiki/Annual_percentage_rate),
  [EAR](https://en.wikipedia.org/wiki/Effective_interest_rate), [Real
  Rate](https://en.wikipedia.org/wiki/Real_interest_rate).

- Leases: a debt with a bank where purchase invoices are necessary

Code Analysis

Views touched (14)
XML IDNameModelTypeStatus
account_loan_form account.loan.form account.loan form New
account_loan_generate_wizard_form Pay amount account.loan.generate.wizard form New
account_loan_increase_amount_form_view account.loan.increase.amount.form (in account_loan) account.loan.increase.amount form New
account_loan_line_form account.loan.line.form account.loan.line form New
account_loan_line_tree account.loan.line.tree account.loan.line tree New
account_loan_lines_view account.loan.lines.view account.loan.line tree New
account_loan_pay_amount_form Pay amount account.loan.pay.amount form New
account_loan_pivot account.loan.pivot account.loan pivot New
account_loan_post_form Post loan account.loan.post form New
account_loan_search account.loan.tree account.loan search New
account_loan_tree account.loan.tree account.loan tree New
res_partner_form_view res.partner.form (in account_loan) res.partner div Inherits base.view_partner_form
view_account_loan_lines_search Loan Items account.loan.line search New
view_move_form Add to_be_reversed and reversal_id fields account.move field Inherits account.view_move_form
Models touched (8)

New fields (35)
  • company_id Many2one → res.company
    default=_default_company required=True args: 'res.company'
  • currency_id Many2one → res.currency
    compute='_compute_currency' readonly=True args: 'res.currency'
  • fixed_amount Monetary
    compute='_compute_fixed_amount' currency_field='currency_id'
  • fixed_loan_amount Monetary
    copy=False currency_field='currency_id' default=0 readonly=True
  • fixed_periods Integer
    copy=False default=0 readonly=True
  • interest_expenses_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account where the interests will be assigned to' required=True string='Interests account' args: 'account.account'
  • interests_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id' string='Total interests payed'
  • interests_product_id Many2one → product.product
    help='Product where the amount of interests will be assigned when the invoice is created' string='Interest product' args: 'product.product'
  • is_leasing Boolean
  • journal_id Many2one → account.journal
    domain="[('company_id', '=', company_id),('type', '=', journal_type)]" required=True args: 'account.journal'
  • journal_type Char
    compute='_compute_journal_type'
  • leased_asset_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" args: 'account.account'
  • line_ids One2many → account.loan.line
    copy=False inverse_name='loan_id' readonly=True args: 'account.loan.line'
  • loan_amount Monetary
    currency_field='currency_id' required=True
  • loan_type Selection
    default='fixed-annuity' help='Method of computation of the period annuity' required=True args: [('fixed-annuity', 'Fixed Annuity'), ('fixed-annuity-begin', 'Fixed Annuity Begin'), ('fixed-principal', 'Fixed Principal'), ('interest', 'Only interest')]
  • long_term_loan_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account that will contain the pending amount on Long term' string='Long term account' args: 'account.account'
  • method_period Integer
    default=1 help='State here the time between 2 depreciations, in months' required=True string='Period Length'
  • move_count Integer
    compute='_compute_move_count'
  • move_ids One2many → account.move
    copy=False inverse_name='loan_id' args: 'account.move'
  • name Char
    copy=False default='/' required=True
  • partner_id Many2one → res.partner
    help='Company or individual that lends the money at an interest rate.' required=True string='Lender' args: 'res.partner'
  • payment_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id' string='Total payed amount'
  • payment_on_first_period Boolean
    help='When checked, the first payment will be on start date'
  • pending_principal_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id'
  • periods Integer
    help='Number of periods that the loan will last' required=True
  • post_invoice Boolean
    default=True help='Invoices will be posted automatically'
  • product_id Many2one → product.product
    help='Product where the amount of the loan will be assigned when the invoice is created' string='Loan product' args: 'product.product'
  • rate Float
    default=0.0 digits=(8, 6) help='Currently applied rate' required=True tracking=True
  • rate_period Float
    compute='_compute_rate_period' digits=(8, 6) help='Real rate that will be applied on each period'
  • rate_type Selection
    default='napr' help='Method of computation of the applied rate' required=True args: [('napr', 'Nominal APR'), ('ear', 'EAR'), ('real', 'Real rate')]
  • residual_amount Monetary
    currency_field='currency_id' default=0.0 help='Residual amount of the lease that must be payed on the end in order to acquire the asset' required=True
  • round_on_end Boolean
    help='When checked, the differences will be applied on the last period, if it is unchecked, the annuity will be recalculated on each period.'
  • short_term_loan_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account that will contain the pending amount on short term' required=True string='Short term account' args: 'account.account'
  • start_date Date
    copy=False help='Start of the moves'
  • state Selection
    copy=False default='draft' required=True args: [('draft', 'Draft'), ('posted', 'Posted'), ('cancelled', 'Cancelled'), ('closed', 'Closed')]
Public methods (7)
  • button_draft(self)
  • close(self)
  • compute_lines(self)
  • create(self, vals_list)
    @api.model_create_multi
  • post(self)
  • view_account_invoices(self)
  • view_account_moves(self)

New fields (2)
  • date Date
    default=fields.Date.context_today help='Choose the period for which you want to automatically post the depreciation lines of running assets' required=True args: 'Account Date'
  • loan_type Selection
    default='loan' required=True args: [('leasing', 'Leasings'), ('loan', 'Loans')]
Public methods (1)
  • run(self)

New fields (6)
  • account_id Many2one → account.account
    default=<expr> required=True args: 'account.account'
  • amount Monetary
    currency_field='currency_id' string='Amount to reduce from Principal'
  • currency_id Many2one → res.currency
    readonly=True related='loan_id.currency_id' args: 'res.currency'
  • date Date
    default=fields.Date.today() required=True
  • journal_id Many2one → account.journal
    default=<expr> required=True args: 'account.journal'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (2)
  • new_line_vals(self, sequence)
  • run(self)

New fields (25)
  • company_id Many2one → res.company
    related='loan_id.company_id' store=True args: 'res.company'
  • currency_id Many2one → res.currency
    related='loan_id.currency_id' args: 'res.currency'
  • date Date
    help='Date when the payment will be accounted' readonly=True required=True
  • final_pending_principal_amount Monetary
    compute='_compute_amounts' currency_field='currency_id' help='Pending amount of the loan after the payment' store=True
  • has_invoices Boolean
    compute='_compute_has_invoices'
  • has_moves Boolean
    compute='_compute_has_moves'
  • interest_expenses_account_id Many2one → account.account
    related='loan_id.interest_expenses_account_id' args: 'account.account'
  • interests_amount Monetary
    compute='_compute_interests_amount' currency_field='currency_id' help='Amount of the payment that will be assigned to interests' readonly=False store=True
  • is_leasing Boolean
    related='loan_id.is_leasing'
  • journal_id Many2one → account.journal
    related='loan_id.journal_id' args: 'account.journal'
  • loan_id Many2one → account.loan
    ondelete='cascade' readonly=True required=True args: 'account.loan'
  • loan_state Selection
    readonly=True related='loan_id.state' store=True
  • loan_type Selection
    related='loan_id.loan_type'
  • long_term_loan_account_id Many2one → account.account
    related='loan_id.long_term_loan_account_id' args: 'account.account'
  • long_term_pending_principal_amount Monetary
    currency_field='currency_id' help='Pending amount of the loan before the payment that will not be payed in, at least, 12 months' readonly=True
  • long_term_principal_amount Monetary
    currency_field='currency_id' help='Amount that will reduce the pending loan amount on long term' readonly=True
  • move_ids One2many → account.move
    inverse_name='loan_line_id' args: 'account.move'
  • name Char
    compute='_compute_name'
  • partner_id Many2one → res.partner
    related='loan_id.partner_id' args: 'res.partner'
  • payment_amount Monetary
    compute='_compute_payment_amount' currency_field='currency_id' help='Total amount that will be payed (Annuity)' readonly=False store=True
  • pending_principal_amount Monetary
    currency_field='currency_id' help='Pending amount of the loan before the payment' readonly=False
  • principal_amount Monetary
    compute='_compute_principal_amount' currency_field='currency_id' help='Amount of the payment that will reduce the pending loan amount' store=True
  • rate Float
    compute='_compute_rate' digits=(8, 6) readonly=False required=True store=True
  • sequence Integer
    readonly=True required=True
  • short_term_loan_account_id Many2one → account.account
    related='loan_id.short_term_loan_account_id' args: 'account.account'
Public methods (4)
  • view_account_invoices(self)
  • view_account_moves(self)
  • view_account_values(self)
    Shows the invoice if it is a leasing or the move if it is a loan
  • view_process_values(self)
    Computes the annuity and returns the result

New fields (6)
  • amount Monetary
    currency_field='currency_id' string='Amount to reduce from Principal'
  • cancel_loan Boolean
    default=False
  • currency_id Many2one → res.currency
    readonly=True related='loan_id.currency_id' args: 'res.currency'
  • date Date
    default=fields.Date.today() required=True
  • fees Monetary
    currency_field='currency_id' string='Bank fees'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (2)
  • new_line_vals(self, sequence)
  • run(self)

New fields (3)
  • account_id Many2one → account.account
    default=<expr> required=True args: 'account.account'
  • journal_id Many2one → account.journal
    default=<expr> required=True args: 'account.journal'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (3)
  • move_line_vals(self)
  • move_vals(self)
  • run(self)

New fields (2)
  • loan_id Many2one → account.loan
    ondelete='restrict' readonly=True store=True args: 'account.loan'
  • loan_line_id Many2one → account.loan.line
    ondelete='restrict' readonly=True args: 'account.loan.line'
Public methods (1)
  • action_post(self)

New fields (2)
  • lended_loan_count Integer
    compute='_compute_lended_loan_count' help='How many Loans this partner lended to us ?'
  • lended_loan_ids One2many → account.loan
    inverse_name='partner_id' args: 'account.loan'
Public methods (1)
  • action_view_partner_lended_loans(self)
REPOSITORY
REPOSITORYOCA/account-financial-tools
GIT
GIThttps://github.com/OCA/account-financial-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-financial-tools/tree/16.0/account_loan
VERSION
VERSION 1.1.1
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Creu Blanca
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Creu Blanca
COMMITTERS
COMMITTERSEnric Tobella, Pierre Verkest, Weblate, OCA-git-bot, oca-ci, Lindsay, matteo.tognini, Zina Rasoamanana, daniel-chionne
WEBSITE
WEBSITEhttps://github.com/OCA/account-financial-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:47
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES numpy-financial<=1.0.0
numpy>=1.15
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES libatlas-base-dev
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (14)
XML IDNameModelTypeStatus
account_loan_form account.loan.form account.loan form New
account_loan_generate_wizard_form Pay amount account.loan.generate.wizard form New
account_loan_increase_amount_form_view account.loan.increase.amount.form (in account_loan) account.loan.increase.amount form New
account_loan_line_form account.loan.line.form account.loan.line form New
account_loan_line_tree account.loan.line.tree account.loan.line tree New
account_loan_lines_view account.loan.lines.view account.loan.line tree New
account_loan_pay_amount_form Pay amount account.loan.pay.amount form New
account_loan_pivot account.loan.pivot account.loan pivot New
account_loan_post_form Post loan account.loan.post form New
account_loan_search account.loan.tree account.loan search New
account_loan_tree account.loan.tree account.loan tree New
res_partner_form_view res.partner.form (in account_loan) res.partner div Inherits base.view_partner_form
view_account_loan_lines_search Loan Items account.loan.line search New
view_move_form Add to_be_reversed and reversal_id fields account.move field Inherits account.view_move_form
Models touched (8)

New fields (35)
  • company_id Many2one → res.company
    default=_default_company readonly=True required=True states={'draft': [('readonly', False)]} args: 'res.company'
  • currency_id Many2one → res.currency
    compute='_compute_currency' readonly=False store=True args: 'res.currency'
  • fixed_amount Monetary
    compute='_compute_fixed_amount' currency_field='currency_id'
  • fixed_loan_amount Monetary
    copy=False currency_field='currency_id' default=0 readonly=True
  • fixed_periods Integer
    copy=False default=0 readonly=True
  • interest_expenses_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account where the interests will be assigned to' readonly=True required=True states={'draft': [('readonly', False)]} string='Interests account' args: 'account.account'
  • interests_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id' string='Total interests payed'
  • interests_product_id Many2one → product.product
    help='Product where the amount of interests will be assigned when the invoice is created' string='Interest product' args: 'product.product'
  • is_leasing Boolean
    default=False readonly=True states={'draft': [('readonly', False)]}
  • journal_id Many2one → account.journal
    domain="[('company_id', '=', company_id),('type', '=', journal_type)]" readonly=True required=True states={'draft': [('readonly', False)]} args: 'account.journal'
  • journal_type Char
    compute='_compute_journal_type'
  • leased_asset_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" readonly=True states={'draft': [('readonly', False)]} args: 'account.account'
  • line_ids One2many → account.loan.line
    copy=False inverse_name='loan_id' readonly=True args: 'account.loan.line'
  • loan_amount Monetary
    currency_field='currency_id' readonly=True required=True states={'draft': [('readonly', False)]}
  • loan_type Selection
    default='fixed-annuity' help='Method of computation of the period annuity' readonly=True required=True states={'draft': [('readonly', False)]} args: [('fixed-annuity', 'Fixed Annuity'), ('fixed-annuity-begin', 'Fixed Annuity Begin'), ('fixed-principal', 'Fixed Principal'), ('interest', 'Only interest')]
  • long_term_journal_id Many2one → account.journal
    domain="[('company_id', '=', company_id),('type', '=', 'general')]" readonly=True states={'draft': [('readonly', False)]} args: 'account.journal'
  • long_term_loan_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account that will contain the pending amount on Long term' readonly=True states={'draft': [('readonly', False)]} string='Long term account' args: 'account.account'
  • method_period Integer
    default=1 help='State here the time between 2 depreciations, in months' readonly=True required=True states={'draft': [('readonly', False)]} string='Period Length'
  • move_ids One2many → account.move
    copy=False inverse_name='loan_id' args: 'account.move'
  • name Char
    copy=False default='/' readonly=True required=True states={'draft': [('readonly', False)]}
  • partner_id Many2one → res.partner
    help='Company or individual that lends the money at an interest rate.' readonly=True required=True states={'draft': [('readonly', False)]} string='Lender' args: 'res.partner'
  • payment_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id' string='Total payed amount'
  • payment_on_first_period Boolean
    default=False help='When checked, the first payment will be on start date' readonly=True states={'draft': [('readonly', False)]}
  • pending_principal_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id'
  • periods Integer
    help='Number of periods that the loan will last' readonly=True required=True states={'draft': [('readonly', False)]}
  • post_invoice Boolean
    default=True help='Invoices will be posted automatically'
  • product_id Many2one → product.product
    help='Product where the amount of the loan will be assigned when the invoice is created' string='Loan product' args: 'product.product'
  • rate Float
    default=0.0 digits=(8, 6) help='Currently applied rate' required=True tracking=True
  • rate_period Float
    compute='_compute_rate_period' digits=(8, 6) help='Real rate that will be applied on each period'
  • rate_type Selection
    default='napr' help='Method of computation of the applied rate' readonly=True required=True states={'draft': [('readonly', False)]} args: [('napr', 'Nominal APR'), ('ear', 'EAR'), ('real', 'Real rate')]
  • residual_amount Monetary
    currency_field='currency_id' default=0.0 help='Residual amount of the lease that must be payed on the end in order to acquire the asset' readonly=True required=True states={'draft': [('readonly', False)]}
  • round_on_end Boolean
    default=False help='When checked, the differences will be applied on the last period, if it is unchecked, the annuity will be recalculated on each period.' readonly=True states={'draft': [('readonly', False)]}
  • short_term_loan_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account that will contain the pending amount on short term' readonly=True required=True states={'draft': [('readonly', False)]} string='Short term account' args: 'account.account'
  • start_date Date
    copy=False help='Start of the moves' readonly=True states={'draft': [('readonly', False)]}
  • state Selection
    copy=False default='draft' required=True args: [('draft', 'Draft'), ('posted', 'Posted'), ('cancelled', 'Cancelled'), ('closed', 'Closed')]
Public methods (6)
  • close(self)
  • compute_lines(self)
  • create(self, vals_list)
    @api.model_create_multi
  • post(self)
  • view_account_invoices(self)
  • view_account_moves(self)

New fields (2)
  • date Date
    default=fields.Date.context_today help='Choose the period for which you want to automatically post the depreciation lines of running assets' required=True args: 'Account Date'
  • loan_type Selection
    default='loan' required=True args: [('leasing', 'Leasings'), ('loan', 'Loans')]
Public methods (1)
  • run(self)

New fields (6)
  • account_id Many2one → account.account
    default=<expr> required=True args: 'account.account'
  • amount Monetary
    currency_field='currency_id' string='Amount to reduce from Principal'
  • currency_id Many2one → res.currency
    readonly=True related='loan_id.currency_id' args: 'res.currency'
  • date Date
    default=fields.Date.today() required=True
  • journal_id Many2one → account.journal
    default=<expr> required=True args: 'account.journal'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (2)
  • new_line_vals(self, sequence)
  • run(self)

New fields (25)
  • company_id Many2one → res.company
    readonly=True related='loan_id.company_id' store=True args: 'res.company'
  • currency_id Many2one → res.currency
    related='loan_id.currency_id' args: 'res.currency'
  • date Date
    help='Date when the payment will be accounted' readonly=True required=True
  • final_pending_principal_amount Monetary
    compute='_compute_amounts' currency_field='currency_id' help='Pending amount of the loan after the payment'
  • has_invoices Boolean
    compute='_compute_has_invoices'
  • has_moves Boolean
    compute='_compute_has_moves'
  • interest_expenses_account_id Many2one → account.account
    readonly=True related='loan_id.interest_expenses_account_id' args: 'account.account'
  • interests_amount Monetary
    currency_field='currency_id' help='Amount of the payment that will be assigned to interests' readonly=True
  • is_leasing Boolean
    readonly=True related='loan_id.is_leasing'
  • journal_id Many2one → account.journal
    readonly=True related='loan_id.journal_id' args: 'account.journal'
  • loan_id Many2one → account.loan
    ondelete='cascade' readonly=True required=True args: 'account.loan'
  • loan_state Selection
    readonly=True related='loan_id.state' store=True
  • loan_type Selection
    readonly=True related='loan_id.loan_type'
  • long_term_loan_account_id Many2one → account.account
    readonly=True related='loan_id.long_term_loan_account_id' args: 'account.account'
  • long_term_pending_principal_amount Monetary
    currency_field='currency_id' help='Pending amount of the loan before the payment that will not be payed in, at least, 12 months' readonly=True
  • long_term_principal_amount Monetary
    currency_field='currency_id' help='Amount that will reduce the pending loan amount on long term' readonly=True
  • move_ids One2many → account.move
    inverse_name='loan_line_id' args: 'account.move'
  • name Char
    compute='_compute_name'
  • partner_id Many2one → res.partner
    readonly=True related='loan_id.partner_id' args: 'res.partner'
  • payment_amount Monetary
    currency_field='currency_id' help='Total amount that will be payed (Annuity)' readonly=True
  • pending_principal_amount Monetary
    currency_field='currency_id' help='Pending amount of the loan before the payment' readonly=True
  • principal_amount Monetary
    compute='_compute_amounts' currency_field='currency_id' help='Amount of the payment that will reduce the pending loan amount'
  • rate Float
    digits=(8, 6) readonly=True required=True
  • sequence Integer
    readonly=True required=True
  • short_term_loan_account_id Many2one → account.account
    readonly=True related='loan_id.short_term_loan_account_id' args: 'account.account'
Public methods (4)
  • view_account_invoices(self)
  • view_account_moves(self)
  • view_account_values(self)
    Shows the invoice if it is a leasing or the move if it is a loan
  • view_process_values(self)
    Computes the annuity and returns the result

New fields (6)
  • amount Monetary
    currency_field='currency_id' string='Amount to reduce from Principal'
  • cancel_loan Boolean
    default=False
  • currency_id Many2one → res.currency
    readonly=True related='loan_id.currency_id' args: 'res.currency'
  • date Date
    default=fields.Date.today() required=True
  • fees Monetary
    currency_field='currency_id' string='Bank fees'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (2)
  • new_line_vals(self, sequence)
  • run(self)

New fields (3)
  • account_id Many2one → account.account
    default=<expr> required=True args: 'account.account'
  • journal_id Many2one → account.journal
    default=<expr> required=True args: 'account.journal'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (3)
  • move_line_vals(self)
  • move_vals(self)
  • run(self)

New fields (2)
  • loan_id Many2one → account.loan
    ondelete='restrict' readonly=True store=True args: 'account.loan'
  • loan_line_id Many2one → account.loan.line
    ondelete='restrict' readonly=True args: 'account.loan.line'
Public methods (1)
  • action_post(self)

New fields (2)
  • lended_loan_count Integer
    compute='_compute_lended_loan_count' help='How many Loans this partner lended to us ?'
  • lended_loan_ids One2many → account.loan
    inverse_name='partner_id' args: 'account.loan'
Public methods (1)
  • action_view_partner_lended_loans(self)
REPOSITORY
REPOSITORYOCA/account-financial-tools
GIT
GIThttps://github.com/OCA/account-financial-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-financial-tools/tree/15.0/account_loan
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Creu Blanca
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Creu Blanca
COMMITTERS
COMMITTERSEnric Tobella, Adrien Peiffer, Weblate, OCA-git-bot, oca-ci, yartsev, daniel-chionne
WEBSITE
WEBSITEhttps://github.com/OCA/account-financial-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:34
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES numpy
numpy-financial<=1.0.0
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (9)
XML IDNameModelTypeStatus
account_loan_form account.loan.form account.loan form New
account_loan_generate_wizard_form Pay amount account.loan.generate.wizard form New
account_loan_line_form account.loan.line.form account.loan.line form New
account_loan_line_tree account.loan.line.tree account.loan.line tree New
account_loan_pay_amount_form Pay amount account.loan.pay.amount form New
account_loan_pivot account.loan.pivot account.loan pivot New
account_loan_post_form Post loan account.loan.post form New
account_loan_tree account.loan.tree account.loan tree New
view_move_form Add to_be_reversed and reversal_id fields account.move field Inherits account.view_move_form
Models touched (6)

New fields (34)
  • company_id Many2one → res.company
    default=_default_company readonly=True required=True states={'draft': [('readonly', False)]} args: 'res.company'
  • currency_id Many2one → res.currency
    compute='_compute_currency' readonly=True args: 'res.currency'
  • fixed_amount Monetary
    compute='_compute_fixed_amount' currency_field='currency_id'
  • fixed_loan_amount Monetary
    copy=False currency_field='currency_id' default=0 readonly=True
  • fixed_periods Integer
    copy=False default=0 readonly=True
  • interest_expenses_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account where the interests will be assigned to' readonly=True required=True states={'draft': [('readonly', False)]} string='Interests account' args: 'account.account'
  • interests_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id' string='Total interests payed'
  • interests_product_id Many2one → product.product
    help='Product where the amount of interests will be assigned when the invoice is created' string='Interest product' args: 'product.product'
  • is_leasing Boolean
    default=False readonly=True states={'draft': [('readonly', False)]}
  • journal_id Many2one → account.journal
    domain="[('company_id', '=', company_id),('type', '=', journal_type)]" readonly=True required=True states={'draft': [('readonly', False)]} args: 'account.journal'
  • journal_type Char
    compute='_compute_journal_type'
  • leased_asset_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" readonly=True states={'draft': [('readonly', False)]} args: 'account.account'
  • line_ids One2many → account.loan.line
    copy=False inverse_name='loan_id' readonly=True args: 'account.loan.line'
  • loan_amount Monetary
    currency_field='currency_id' readonly=True required=True states={'draft': [('readonly', False)]}
  • loan_type Selection
    default='fixed-annuity' help='Method of computation of the period annuity' readonly=True required=True states={'draft': [('readonly', False)]} args: [('fixed-annuity', 'Fixed Annuity'), ('fixed-annuity-begin', 'Fixed Annuity Begin'), ('fixed-principal', 'Fixed Principal'), ('interest', 'Only interest')]
  • long_term_loan_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account that will contain the pending amount on Long term' readonly=True states={'draft': [('readonly', False)]} string='Long term account' args: 'account.account'
  • method_period Integer
    default=1 help='State here the time between 2 depreciations, in months' readonly=True required=True states={'draft': [('readonly', False)]} string='Period Length'
  • move_ids One2many → account.move
    copy=False inverse_name='loan_id' args: 'account.move'
  • name Char
    copy=False default='/' readonly=True required=True states={'draft': [('readonly', False)]}
  • partner_id Many2one → res.partner
    help='Company or individual that lends the money at an interest rate.' readonly=True required=True states={'draft': [('readonly', False)]} string='Lender' args: 'res.partner'
  • payment_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id' string='Total payed amount'
  • payment_on_first_period Boolean
    default=False help='When checked, the first payment will be on start date' readonly=True states={'draft': [('readonly', False)]}
  • pending_principal_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id'
  • periods Integer
    help='Number of periods that the loan will last' readonly=True required=True states={'draft': [('readonly', False)]}
  • post_invoice Boolean
    default=True help='Invoices will be posted automatically'
  • product_id Many2one → product.product
    help='Product where the amount of the loan will be assigned when the invoice is created' string='Loan product' args: 'product.product'
  • rate Float
    default=0.0 digits=(8, 6) help='Currently applied rate' required=True tracking=True
  • rate_period Float
    compute='_compute_rate_period' digits=(8, 6) help='Real rate that will be applied on each period'
  • rate_type Selection
    default='napr' help='Method of computation of the applied rate' readonly=True required=True states={'draft': [('readonly', False)]} args: [('napr', 'Nominal APR'), ('ear', 'EAR'), ('real', 'Real rate')]
  • residual_amount Monetary
    currency_field='currency_id' default=0.0 help='Residual amount of the lease that must be payed on the end in order to acquire the asset' readonly=True required=True states={'draft': [('readonly', False)]}
  • round_on_end Boolean
    default=False help='When checked, the differences will be applied on the last period, if it is unchecked, the annuity will be recalculated on each period.' readonly=True states={'draft': [('readonly', False)]}
  • short_term_loan_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account that will contain the pending amount on short term' readonly=True required=True states={'draft': [('readonly', False)]} string='Short term account' args: 'account.account'
  • start_date Date
    copy=False help='Start of the moves' readonly=True states={'draft': [('readonly', False)]}
  • state Selection
    copy=False default='draft' required=True args: [('draft', 'Draft'), ('posted', 'Posted'), ('cancelled', 'Cancelled'), ('closed', 'Closed')]
Public methods (15)
  • check_long_term_principal_amount(self)
    Recomputes the long term pending principal of unfinished lines.
  • close(self)
  • compute_draft_lines(self)
  • compute_lines(self)
  • compute_posted_lines(self)
    Recompute the amounts of not finished lines. Useful if rate is changed
  • compute_rate(self, rate, rate_type, method_period)
    @api.model
    Returns the real rate :param rate: Rate :param rate_type: Computation rate :param method_period: Number of months between payments :return:
  • create(self, vals)
    @api.model
  • generate_leasing_entries(self, date)
    @api.model
  • generate_loan_entries(self, date)
    @api.model
    Generate the moves of unfinished loans before date :param date: :return:
  • get_default_name(self, vals)
  • loan_rate(self)
  • new_line_vals(self, sequence, date, amount)
  • post(self)
  • view_account_invoices(self)
  • view_account_moves(self)

New fields (2)
  • date Date
    default=fields.Date.context_today help='Choose the period for which you want to automatically post the depreciation lines of running assets' required=True args: 'Account Date'
  • loan_type Selection
    default='loan' required=True args: [('leasing', 'Leasings'), ('loan', 'Loans')]
Public methods (3)
  • run(self)
  • run_leasing(self)
  • run_loan(self)

New fields (20)
  • currency_id Many2one → res.currency
    related='loan_id.currency_id' args: 'res.currency'
  • date Date
    help='Date when the payment will be accounted' readonly=True required=True
  • final_pending_principal_amount Monetary
    compute='_compute_amounts' currency_field='currency_id' help='Pending amount of the loan after the payment'
  • has_invoices Boolean
    compute='_compute_has_invoices'
  • has_moves Boolean
    compute='_compute_has_moves'
  • interests_amount Monetary
    currency_field='currency_id' help='Amount of the payment that will be assigned to interests' readonly=True
  • is_leasing Boolean
    readonly=True related='loan_id.is_leasing'
  • loan_id Many2one → account.loan
    ondelete='cascade' readonly=True required=True args: 'account.loan'
  • loan_state Selection
    readonly=True related='loan_id.state' store=True
  • loan_type Selection
    readonly=True related='loan_id.loan_type'
  • long_term_loan_account_id Many2one → account.account
    readonly=True related='loan_id.long_term_loan_account_id' args: 'account.account'
  • long_term_pending_principal_amount Monetary
    currency_field='currency_id' help='Pending amount of the loan before the payment that will not be payed in, at least, 12 months' readonly=True
  • long_term_principal_amount Monetary
    currency_field='currency_id' help='Amount that will reduce the pending loan amount on long term' readonly=True
  • move_ids One2many → account.move
    inverse_name='loan_line_id' args: 'account.move'
  • name Char
    compute='_compute_name'
  • payment_amount Monetary
    currency_field='currency_id' help='Total amount that will be payed (Annuity)' readonly=True
  • pending_principal_amount Monetary
    currency_field='currency_id' help='Pending amount of the loan before the payment' readonly=True
  • principal_amount Monetary
    compute='_compute_amounts' currency_field='currency_id' help='Amount of the payment that will reduce the pending loan amount'
  • rate Float
    digits=(8, 6) readonly=True required=True
  • sequence Integer
    readonly=True required=True
Public methods (14)
  • check_amount(self)
    Recompute amounts if the annuity has not been processed
  • check_move_amount(self)
    Changes the amounts of the annuity once the move is posted :return:
  • compute_amount(self)
    Computes the payment amount :return: Amount to be payed on the annuity
  • compute_interest(self)
  • generate_invoice(self)
    Computes invoices of leases :return: list of account.move generated
  • generate_move(self)
    Computes and post the moves of loans :return: list of account.move generated
  • invoice_line_vals(self)
  • invoice_vals(self)
  • move_line_vals(self)
  • move_vals(self)
  • view_account_invoices(self)
  • view_account_moves(self)
  • view_account_values(self)
    Shows the invoice if it is a leasing or the move if it is a loan
  • view_process_values(self)
    Computes the annuity and returns the result

New fields (6)
  • amount Monetary
    currency_field='currency_id' string='Amount to reduce from Principal'
  • cancel_loan Boolean
    default=False
  • currency_id Many2one → res.currency
    readonly=True related='loan_id.currency_id' args: 'res.currency'
  • date Date
    default=fields.Date.today() required=True
  • fees Monetary
    currency_field='currency_id' string='Bank fees'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (2)
  • new_line_vals(self, sequence)
  • run(self)

New fields (3)
  • account_id Many2one → account.account
    default=<expr> required=True args: 'account.account'
  • journal_id Many2one → account.journal
    default=<expr> required=True args: 'account.journal'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (3)
  • move_line_vals(self)
  • move_vals(self)
  • run(self)

New fields (2)
  • loan_id Many2one → account.loan
    ondelete='restrict' readonly=True store=True args: 'account.loan'
  • loan_line_id Many2one → account.loan.line
    ondelete='restrict' readonly=True args: 'account.loan.line'
Public methods (1)
  • action_post(self)
REPOSITORY
REPOSITORYOCA/account-financial-tools
GIT
GIThttps://github.com/OCA/account-financial-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-financial-tools/tree/14.0/account_loan
VERSION
VERSION 1.2.0
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Creu Blanca
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Creu Blanca
COMMITTERS
COMMITTERSEnric Tobella, cubells, OCA Transbot, Miquel Raïch, oca-travis, Weblate, OCA-git-bot, sergiocorato, oca-ci, Giovanni, matteo.tognini, aromera, Núria Sancho, daniel-chionne, Eduard Brahas, Bearnard21
WEBSITE
WEBSITEhttps://github.com/OCA/account-financial-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:01
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES numpy-financial<=1.0.0
numpy>=1.15
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES libatlas-base-dev
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (11)
XML IDNameModelTypeStatus
account_loan_form account.loan.form account.loan form New
account_loan_generate_wizard_form Pay amount account.loan.generate.wizard form New
account_loan_line_form account.loan.line.form account.loan.line form New
account_loan_line_tree account.loan.line.tree account.loan.line tree New
account_loan_lines_view account.loan.lines.view account.loan.line tree New
account_loan_pay_amount_form Pay amount account.loan.pay.amount form New
account_loan_pivot account.loan.pivot account.loan pivot New
account_loan_post_form Post loan account.loan.post form New
account_loan_tree account.loan.tree account.loan tree New
view_account_loan_lines_search Loan Items account.loan.line search New
view_move_form Add to_be_reversed and reversal_id fields account.move field Inherits account.view_move_form
Models touched (6)

New fields (34)
  • company_id Many2one → res.company
    default=_default_company readonly=True required=True states={'draft': [('readonly', False)]} args: 'res.company'
  • currency_id Many2one → res.currency
    compute='_compute_currency' readonly=True args: 'res.currency'
  • fixed_amount Monetary
    compute='_compute_fixed_amount' currency_field='currency_id'
  • fixed_loan_amount Monetary
    copy=False currency_field='currency_id' default=0 readonly=True
  • fixed_periods Integer
    copy=False default=0 readonly=True
  • interest_expenses_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account where the interests will be assigned to' readonly=True required=True states={'draft': [('readonly', False)]} string='Interests account' args: 'account.account'
  • interests_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id' string='Total interests payed'
  • interests_product_id Many2one → product.product
    help='Product where the amount of interests will be assigned when the invoice is created' string='Interest product' args: 'product.product'
  • is_leasing Boolean
    default=False readonly=True states={'draft': [('readonly', False)]}
  • journal_id Many2one → account.journal
    domain="[('company_id', '=', company_id),('type', '=', journal_type)]" readonly=True required=True states={'draft': [('readonly', False)]} args: 'account.journal'
  • journal_type Char
    compute='_compute_journal_type'
  • leased_asset_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" readonly=True states={'draft': [('readonly', False)]} args: 'account.account'
  • line_ids One2many → account.loan.line
    copy=False inverse_name='loan_id' readonly=True args: 'account.loan.line'
  • loan_amount Monetary
    currency_field='currency_id' readonly=True required=True states={'draft': [('readonly', False)]}
  • loan_type Selection
    default='fixed-annuity' help='Method of computation of the period annuity' readonly=True required=True states={'draft': [('readonly', False)]} args: [('fixed-annuity', 'Fixed Annuity'), ('fixed-annuity-begin', 'Fixed Annuity Begin'), ('fixed-principal', 'Fixed Principal'), ('interest', 'Only interest')]
  • long_term_loan_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account that will contain the pending amount on Long term' readonly=True states={'draft': [('readonly', False)]} string='Long term account' args: 'account.account'
  • method_period Integer
    default=1 help='State here the time between 2 depreciations, in months' readonly=True required=True states={'draft': [('readonly', False)]} string='Period Length'
  • move_ids One2many → account.move
    copy=False inverse_name='loan_id' args: 'account.move'
  • name Char
    copy=False default='/' readonly=True required=True states={'draft': [('readonly', False)]}
  • partner_id Many2one → res.partner
    help='Company or individual that lends the money at an interest rate.' readonly=True required=True states={'draft': [('readonly', False)]} string='Lender' args: 'res.partner'
  • payment_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id' string='Total payed amount'
  • payment_on_first_period Boolean
    default=False help='When checked, the first payment will be on start date' readonly=True states={'draft': [('readonly', False)]}
  • pending_principal_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id'
  • periods Integer
    help='Number of periods that the loan will last' readonly=True required=True states={'draft': [('readonly', False)]}
  • post_invoice Boolean
    default=True help='Invoices will be posted automatically'
  • product_id Many2one → product.product
    help='Product where the amount of the loan will be assigned when the invoice is created' string='Loan product' args: 'product.product'
  • rate Float
    default=0.0 digits=(8, 6) help='Currently applied rate' required=True tracking=True
  • rate_period Float
    compute='_compute_rate_period' digits=(8, 6) help='Real rate that will be applied on each period'
  • rate_type Selection
    default='napr' help='Method of computation of the applied rate' readonly=True required=True states={'draft': [('readonly', False)]} args: [('napr', 'Nominal APR'), ('ear', 'EAR'), ('real', 'Real rate')]
  • residual_amount Monetary
    currency_field='currency_id' default=0.0 help='Residual amount of the lease that must be payed on the end in order to acquire the asset' readonly=True required=True states={'draft': [('readonly', False)]}
  • round_on_end Boolean
    default=False help='When checked, the differences will be applied on the last period, if it is unchecked, the annuity will be recalculated on each period.' readonly=True states={'draft': [('readonly', False)]}
  • short_term_loan_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account that will contain the pending amount on short term' readonly=True required=True states={'draft': [('readonly', False)]} string='Short term account' args: 'account.account'
  • start_date Date
    copy=False help='Start of the moves' readonly=True states={'draft': [('readonly', False)]}
  • state Selection
    copy=False default='draft' required=True args: [('draft', 'Draft'), ('posted', 'Posted'), ('cancelled', 'Cancelled'), ('closed', 'Closed')]
Public methods (15)
  • check_long_term_principal_amount(self)
    Recomputes the long term pending principal of unfinished lines.
  • close(self)
  • compute_draft_lines(self)
  • compute_lines(self)
  • compute_posted_lines(self)
    Recompute the amounts of not finished lines. Useful if rate is changed
  • compute_rate(self, rate, rate_type, method_period)
    @api.model
    Returns the real rate :param rate: Rate :param rate_type: Computation rate :param method_period: Number of months between payments :return:
  • create(self, vals)
    @api.model
  • generate_leasing_entries(self, date)
    @api.model
  • generate_loan_entries(self, date)
    @api.model
    Generate the moves of unfinished loans before date :param date: :return:
  • get_default_name(self, vals)
  • loan_rate(self)
  • new_line_vals(self, sequence, date, amount)
  • post(self)
  • view_account_invoices(self)
  • view_account_moves(self)

New fields (2)
  • date Date
    default=fields.Date.context_today help='Choose the period for which you want to automatically post the depreciation lines of running assets' required=True args: 'Account Date'
  • loan_type Selection
    default='loan' required=True args: [('leasing', 'Leasings'), ('loan', 'Loans')]
Public methods (3)
  • run(self)
  • run_leasing(self)
  • run_loan(self)

New fields (25)
  • company_id Many2one → res.company
    readonly=True related='loan_id.company_id' store=True args: 'res.company'
  • currency_id Many2one → res.currency
    related='loan_id.currency_id' args: 'res.currency'
  • date Date
    help='Date when the payment will be accounted' readonly=True required=True
  • final_pending_principal_amount Monetary
    compute='_compute_amounts' currency_field='currency_id' help='Pending amount of the loan after the payment'
  • has_invoices Boolean
    compute='_compute_has_invoices'
  • has_moves Boolean
    compute='_compute_has_moves'
  • interest_expenses_account_id Many2one → account.account
    readonly=True related='loan_id.interest_expenses_account_id' args: 'account.account'
  • interests_amount Monetary
    currency_field='currency_id' help='Amount of the payment that will be assigned to interests' readonly=True
  • is_leasing Boolean
    readonly=True related='loan_id.is_leasing'
  • journal_id Many2one → account.journal
    readonly=True related='loan_id.journal_id' args: 'account.journal'
  • loan_id Many2one → account.loan
    ondelete='cascade' readonly=True required=True args: 'account.loan'
  • loan_state Selection
    readonly=True related='loan_id.state' store=True
  • loan_type Selection
    readonly=True related='loan_id.loan_type'
  • long_term_loan_account_id Many2one → account.account
    readonly=True related='loan_id.long_term_loan_account_id' args: 'account.account'
  • long_term_pending_principal_amount Monetary
    currency_field='currency_id' help='Pending amount of the loan before the payment that will not be payed in, at least, 12 months' readonly=True
  • long_term_principal_amount Monetary
    currency_field='currency_id' help='Amount that will reduce the pending loan amount on long term' readonly=True
  • move_ids One2many → account.move
    inverse_name='loan_line_id' args: 'account.move'
  • name Char
    compute='_compute_name'
  • partner_id Many2one → res.partner
    readonly=True related='loan_id.partner_id' args: 'res.partner'
  • payment_amount Monetary
    currency_field='currency_id' help='Total amount that will be payed (Annuity)' readonly=True
  • pending_principal_amount Monetary
    currency_field='currency_id' help='Pending amount of the loan before the payment' readonly=True
  • principal_amount Monetary
    compute='_compute_amounts' currency_field='currency_id' help='Amount of the payment that will reduce the pending loan amount'
  • rate Float
    digits=(8, 6) readonly=True required=True
  • sequence Integer
    readonly=True required=True
  • short_term_loan_account_id Many2one → account.account
    readonly=True related='loan_id.short_term_loan_account_id' args: 'account.account'
Public methods (14)
  • check_amount(self)
    Recompute amounts if the annuity has not been processed
  • check_move_amount(self)
    Changes the amounts of the annuity once the move is posted :return:
  • compute_amount(self)
    Computes the payment amount :return: Amount to be payed on the annuity
  • compute_interest(self)
  • generate_invoice(self)
    Computes invoices of leases :return: list of account.move generated
  • generate_move(self)
    Computes and post the moves of loans :return: list of account.move generated
  • invoice_line_vals(self)
  • invoice_vals(self)
  • move_line_vals(self)
  • move_vals(self)
  • view_account_invoices(self)
  • view_account_moves(self)
  • view_account_values(self)
    Shows the invoice if it is a leasing or the move if it is a loan
  • view_process_values(self)
    Computes the annuity and returns the result

New fields (6)
  • amount Monetary
    currency_field='currency_id' string='Amount to reduce from Principal'
  • cancel_loan Boolean
    default=False
  • currency_id Many2one → res.currency
    readonly=True related='loan_id.currency_id' args: 'res.currency'
  • date Date
    default=fields.Date.today() required=True
  • fees Monetary
    currency_field='currency_id' string='Bank fees'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (2)
  • new_line_vals(self, sequence)
  • run(self)

New fields (3)
  • account_id Many2one → account.account
    default=<expr> required=True args: 'account.account'
  • journal_id Many2one → account.journal
    default=<expr> required=True args: 'account.journal'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (3)
  • move_line_vals(self)
  • move_vals(self)
  • run(self)

New fields (2)
  • loan_id Many2one → account.loan
    ondelete='restrict' readonly=True store=True args: 'account.loan'
  • loan_line_id Many2one → account.loan.line
    ondelete='restrict' readonly=True args: 'account.loan.line'
Public methods (1)
  • action_post(self)
REPOSITORY
REPOSITORYOCA/account-financial-tools
GIT
GIThttps://github.com/OCA/account-financial-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-financial-tools/tree/13.0/account_loan
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Creu Blanca
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Creu Blanca
COMMITTERS
COMMITTERSEnric Tobella, OCA Transbot, João Marques, oca-travis, Weblate, OCA-git-bot, Alba Riera
WEBSITE
WEBSITEhttps://github.com/OCA/account-financial-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:13
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES numpy
numpy-financial<=1.0.0
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (8)
XML IDNameModelTypeStatus
account_loan_form account.loan.form account.loan form New
account_loan_generate_wizard_form Pay amount account.loan.generate.wizard form New
account_loan_line_form account.loan.line.form account.loan.line form New
account_loan_line_tree account.loan.line.tree account.loan.line tree New
account_loan_pay_amount_form Pay amount account.loan.pay.amount form New
account_loan_post_form Post loan account.loan.post form New
account_loan_tree account.loan.tree account.loan tree New
view_move_form Add to_be_reversed and reversal_id fields account.move field Inherits account.view_move_form
Models touched (6)

New fields (34)
  • company_id Many2one → res.company
    default=_default_company readonly=True required=True states={'draft': [('readonly', False)]} args: 'res.company'
  • currency_id Many2one → res.currency
    compute='_compute_currency' readonly=True args: 'res.currency'
  • fixed_amount Monetary
    compute='_compute_fixed_amount' currency_field='currency_id'
  • fixed_loan_amount Monetary
    copy=False currency_field='currency_id' default=0 readonly=True
  • fixed_periods Integer
    copy=False default=0 readonly=True
  • interest_expenses_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account where the interests will be assigned to' readonly=True required=True states={'draft': [('readonly', False)]} string='Interests account' args: 'account.account'
  • interests_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id' string='Total interests payed'
  • interests_product_id Many2one → product.product
    help='Product where the amount of interests will be assigned when the invoice is created' string='Interest product' args: 'product.product'
  • is_leasing Boolean
    default=False readonly=True states={'draft': [('readonly', False)]}
  • journal_id Many2one → account.journal
    domain="[('company_id', '=', company_id),('type', '=', journal_type)]" readonly=True required=True states={'draft': [('readonly', False)]} args: 'account.journal'
  • journal_type Char
    compute='_compute_journal_type'
  • leased_asset_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" readonly=True states={'draft': [('readonly', False)]} args: 'account.account'
  • line_ids One2many → account.loan.line
    copy=False inverse_name='loan_id' readonly=True args: 'account.loan.line'
  • loan_amount Monetary
    currency_field='currency_id' readonly=True required=True states={'draft': [('readonly', False)]}
  • loan_type Selection
    default='fixed-annuity' help='Method of computation of the period annuity' readonly=True required=True states={'draft': [('readonly', False)]} args: [('fixed-annuity', 'Fixed Annuity'), ('fixed-annuity-begin', 'Fixed Annuity Begin'), ('fixed-principal', 'Fixed Principal'), ('interest', 'Only interest')]
  • long_term_loan_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account that will contain the pending amount on Long term' readonly=True states={'draft': [('readonly', False)]} string='Long term account' args: 'account.account'
  • method_period Integer
    default=1 help='State here the time between 2 depreciations, in months' readonly=True required=True states={'draft': [('readonly', False)]} string='Period Length'
  • move_ids One2many → account.move
    copy=False inverse_name='loan_id' args: 'account.move'
  • name Char
    copy=False default='/' readonly=True required=True states={'draft': [('readonly', False)]}
  • partner_id Many2one → res.partner
    help='Company or individual that lends the money at an interest rate.' readonly=True required=True states={'draft': [('readonly', False)]} string='Lender' args: 'res.partner'
  • payment_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id' string='Total payed amount'
  • payment_on_first_period Boolean
    default=False help='When checked, the first payment will be on start date' readonly=True states={'draft': [('readonly', False)]}
  • pending_principal_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id'
  • periods Integer
    help='Number of periods that the loan will last' readonly=True required=True states={'draft': [('readonly', False)]}
  • post_invoice Boolean
    default=True help='Invoices will be posted automatically'
  • product_id Many2one → product.product
    help='Product where the amount of the loan will be assigned when the invoice is created' string='Loan product' args: 'product.product'
  • rate Float
    default=0.0 digits=(8, 6) help='Currently applied rate' required=True track_visibility='always'
  • rate_period Float
    compute='_compute_rate_period' digits=(8, 6) help='Real rate that will be applied on each period'
  • rate_type Selection
    default='napr' help='Method of computation of the applied rate' readonly=True required=True states={'draft': [('readonly', False)]} args: [('napr', 'Nominal APR'), ('ear', 'EAR'), ('real', 'Real rate')]
  • residual_amount Monetary
    currency_field='currency_id' default=0.0 help='Residual amount of the lease that must be payed on the end in order to acquire the asset' readonly=True required=True states={'draft': [('readonly', False)]}
  • round_on_end Boolean
    default=False help='When checked, the differences will be applied on the last period, if it is unchecked, the annuity will be recalculated on each period.' readonly=True states={'draft': [('readonly', False)]}
  • short_term_loan_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account that will contain the pending amount on short term' readonly=True required=True states={'draft': [('readonly', False)]} string='Short term account' args: 'account.account'
  • start_date Date
    copy=False help='Start of the moves' readonly=True states={'draft': [('readonly', False)]}
  • state Selection
    copy=False default='draft' required=True args: [('draft', 'Draft'), ('posted', 'Posted'), ('cancelled', 'Cancelled'), ('closed', 'Closed')]
Public methods (15)
  • check_long_term_principal_amount(self)
    Recomputes the long term pending principal of unfinished lines.
  • close(self)
  • compute_draft_lines(self)
  • compute_lines(self)
  • compute_posted_lines(self)
    Recompute the amounts of not finished lines. Useful if rate is changed
  • compute_rate(self, rate, rate_type, method_period)
    @api.model
    Returns the real rate :param rate: Rate :param rate_type: Computation rate :param method_period: Number of months between payments :return:
  • create(self, vals)
    @api.model
  • generate_leasing_entries(self, date)
    @api.model
  • generate_loan_entries(self, date)
    @api.model
    Generate the moves of unfinished loans before date :param date: :return:
  • get_default_name(self, vals)
  • loan_rate(self)
  • new_line_vals(self, sequence, date, amount)
  • post(self)
  • view_account_invoices(self)
  • view_account_moves(self)

New fields (2)
  • date Date
    default=fields.Date.context_today help='Choose the period for which you want to automatically post the depreciation lines of running assets' required=True args: 'Account Date'
  • loan_type Selection
    default='loan' required=True args: [('leasing', 'Leasings'), ('loan', 'Loans')]
Public methods (3)
  • run(self)
  • run_leasing(self)
  • run_loan(self)

New fields (20)
  • currency_id Many2one → res.currency
    related='loan_id.currency_id' args: 'res.currency'
  • date Date
    help='Date when the payment will be accounted' readonly=True required=True
  • final_pending_principal_amount Monetary
    compute='_compute_amounts' currency_field='currency_id' help='Pending amount of the loan after the payment'
  • has_invoices Boolean
    compute='_compute_has_invoices'
  • has_moves Boolean
    compute='_compute_has_moves'
  • interests_amount Monetary
    currency_field='currency_id' help='Amount of the payment that will be assigned to interests' readonly=True
  • is_leasing Boolean
    readonly=True related='loan_id.is_leasing'
  • loan_id Many2one → account.loan
    ondelete='cascade' readonly=True required=True args: 'account.loan'
  • loan_state Selection
    readonly=True related='loan_id.state' store=True args: [('draft', 'Draft'), ('posted', 'Posted'), ('cancelled', 'Cancelled'), ('closed', 'Closed')]
  • loan_type Selection
    readonly=True related='loan_id.loan_type' args: [('fixed-annuity', 'Fixed Annuity'), ('fixed-principal', 'Fixed Principal'), ('interest', 'Only interest')]
  • long_term_loan_account_id Many2one → account.account
    readony=True related='loan_id.long_term_loan_account_id' args: 'account.account'
  • long_term_pending_principal_amount Monetary
    currency_field='currency_id' help='Pending amount of the loan before the payment that will not be payed in, at least, 12 months' readonly=True
  • long_term_principal_amount Monetary
    currency_field='currency_id' help='Amount that will reduce the pending loan amount on long term' readonly=True
  • move_ids One2many → account.move
    inverse_name='loan_line_id' args: 'account.move'
  • name Char
    compute='_compute_name'
  • payment_amount Monetary
    currency_field='currency_id' help='Total amount that will be payed (Annuity)' readonly=True
  • pending_principal_amount Monetary
    currency_field='currency_id' help='Pending amount of the loan before the payment' readonly=True
  • principal_amount Monetary
    compute='_compute_amounts' currency_field='currency_id' help='Amount of the payment that will reduce the pending loan amount'
  • rate Float
    digits=(8, 6) readonly=True required=True
  • sequence Integer
    readonly=True required=True
Public methods (14)
  • check_amount(self)
    Recompute amounts if the annuity has not been processed
  • check_move_amount(self)
    Changes the amounts of the annuity once the move is posted :return:
  • compute_amount(self)
    Computes the payment amount :return: Amount to be payed on the annuity
  • compute_interest(self)
  • generate_invoice(self)
    Computes invoices of leases :return: list of account.move generated
  • generate_move(self)
    Computes and post the moves of loans :return: list of account.move generated
  • invoice_line_vals(self)
  • invoice_vals(self)
  • move_line_vals(self)
  • move_vals(self)
  • view_account_invoices(self)
  • view_account_moves(self)
  • view_account_values(self)
    Shows the invoice if it is a leasing or the move if it is a loan
  • view_process_values(self)
    Computes the annuity and returns the result

New fields (6)
  • amount Monetary
    currency_field='currency_id' string='Amount to reduce from Principal'
  • cancel_loan Boolean
    default=False
  • currency_id Many2one → res.currency
    readonly=True related='loan_id.currency_id' args: 'res.currency'
  • date Date
    default=fields.Date.today() required=True
  • fees Monetary
    currency_field='currency_id' string='Bank fees'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (2)
  • new_line_vals(self, sequence)
  • run(self)

New fields (3)
  • account_id Many2one → account.account
    default=<expr> required=True args: 'account.account'
  • journal_id Many2one → account.journal
    default=<expr> required=True args: 'account.journal'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (3)
  • move_line_vals(self)
  • move_vals(self)
  • run(self)

New fields (2)
  • loan_id Many2one → account.loan
    ondelete='restrict' readonly=True store=True args: 'account.loan'
  • loan_line_id Many2one → account.loan.line
    ondelete='restrict' readonly=True args: 'account.loan.line'
Public methods (1)
  • post(self)
REPOSITORY
REPOSITORYOCA/account-financial-tools
GIT
GIThttps://github.com/OCA/account-financial-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-financial-tools/tree/12.0/account_loan
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Creu Blanca
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Creu Blanca
COMMITTERS
COMMITTERSOCA Transbot, oca-travis, Weblate, OCA-git-bot, sergiocorato, amcor
WEBSITE
WEBSITEhttps://github.com/OCA/account-financial-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:18
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - http_routing
    - digest
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES numpy
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (8)
XML IDNameModelTypeStatus
account_loan_form account.loan.form account.loan form New
account_loan_generate_wizard_form Pay amount account.loan.generate.wizard form New
account_loan_line_form account.loan.line.form account.loan.line form New
account_loan_line_tree account.loan.line.tree account.loan.line tree New
account_loan_pay_amount_form Pay amount account.loan.pay.amount form New
account_loan_post_form Post loan account.loan.post form New
account_loan_tree account.loan.tree account.loan tree New
view_move_form Add to_be_reversed and reversal_id fields account.move field Inherits account.view_move_form
Models touched (7)

New fields (2)
  • loan_id Many2one → account.loan
    ondelete='restrict' readonly=True store=True args: 'account.loan'
  • loan_line_id Many2one → account.loan.line
    ondelete='restrict' readonly=True args: 'account.loan.line'
Public methods (1)
  • finalize_invoice_move_lines(self, move_lines)
    @api.multi

New fields (34)
  • company_id Many2one → res.company
    default=_default_company readonly=True required=True states={'draft': [('readonly', False)]} args: 'res.company'
  • currency_id Many2one → res.currency
    compute='_compute_currency' readonly=True args: 'res.currency'
  • fixed_amount Monetary
    compute='_compute_fixed_amount' currency_field='currency_id'
  • fixed_loan_amount Monetary
    copy=False currency_field='currency_id' default=0 readonly=True
  • fixed_periods Integer
    copy=False default=0 readonly=True
  • interest_expenses_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account where the interests will be assigned to' readonly=True required=True states={'draft': [('readonly', False)]} string='Interests account' args: 'account.account'
  • interests_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id' string='Total interests payed'
  • interests_product_id Many2one → product.product
    help='Product where the amount of interests will be assigned when the invoice is created' string='Interest product' args: 'product.product'
  • is_leasing Boolean
    default=False readonly=True states={'draft': [('readonly', False)]}
  • journal_id Many2one → account.journal
    domain="[('company_id', '=', company_id),('type', '=', journal_type)]" readonly=True required=True states={'draft': [('readonly', False)]} args: 'account.journal'
  • journal_type Char
    compute='_compute_journal_type'
  • leased_asset_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" readonly=True states={'draft': [('readonly', False)]} args: 'account.account'
  • line_ids One2many → account.loan.line
    copy=False inverse_name='loan_id' readonly=True args: 'account.loan.line'
  • loan_amount Monetary
    currency_field='currency_id' readonly=True required=True states={'draft': [('readonly', False)]}
  • loan_type Selection
    default='fixed-annuity' help='Method of computation of the period annuity' readonly=True required=True states={'draft': [('readonly', False)]} args: [('fixed-annuity', 'Fixed Annuity'), ('fixed-annuity-begin', 'Fixed Annuity Begin'), ('fixed-principal', 'Fixed Principal'), ('interest', 'Only interest')]
  • long_term_loan_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account that will contain the pending amount on Long term' readonly=True states={'draft': [('readonly', False)]} string='Long term account' args: 'account.account'
  • method_period Integer
    default=1 help='State here the time between 2 depreciations, in months' readonly=True required=True states={'draft': [('readonly', False)]} string='Period Length'
  • move_ids One2many → account.move
    copy=False inverse_name='loan_id' args: 'account.move'
  • name Char
    copy=False default='/' readonly=True required=True states={'draft': [('readonly', False)]}
  • partner_id Many2one → res.partner
    help='Company or individual that lends the money at an interest rate.' readonly=True required=True states={'draft': [('readonly', False)]} string='Lender' args: 'res.partner'
  • payment_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id' string='Total payed amount'
  • payment_on_first_period Boolean
    default=False help='When checked, the first payment will be on start date' readonly=True states={'draft': [('readonly', False)]}
  • pending_principal_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id'
  • periods Integer
    help='Number of periods that the loan will last' readonly=True required=True states={'draft': [('readonly', False)]}
  • post_invoice Boolean
    default=True help='Invoices will be posted automatically'
  • product_id Many2one → product.product
    help='Product where the amount of the loan will be assigned when the invoice is created' string='Loan product' args: 'product.product'
  • rate Float
    default=0.0 digits=(8, 6) help='Currently applied rate' required=True track_visibility='always'
  • rate_period Float
    compute='_compute_rate_period' digits=(8, 6) help='Real rate that will be applied on each period'
  • rate_type Selection
    default='napr' help='Method of computation of the applied rate' readonly=True required=True states={'draft': [('readonly', False)]} args: [('napr', 'Nominal APR'), ('ear', 'EAR'), ('real', 'Real rate')]
  • residual_amount Monetary
    currency_field='currency_id' default=0.0 help='Residual amount of the lease that must be payed on the end in order to acquire the asset' readonly=True required=True states={'draft': [('readonly', False)]}
  • round_on_end Boolean
    default=False help='When checked, the differences will be applied on the last period, if it is unchecked, the annuity will be recalculated on each period.' readonly=True states={'draft': [('readonly', False)]}
  • short_term_loan_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account that will contain the pending amount on short term' readonly=True required=True states={'draft': [('readonly', False)]} string='Short term account' args: 'account.account'
  • start_date Date
    copy=False help='Start of the moves' readonly=True states={'draft': [('readonly', False)]}
  • state Selection
    copy=False default='draft' required=True args: [('draft', 'Draft'), ('posted', 'Posted'), ('cancelled', 'Cancelled'), ('closed', 'Closed')]
Public methods (15)
  • check_long_term_principal_amount(self)
    Recomputes the long term pending principal of unfinished lines.
  • close(self)
    @api.multi
  • compute_draft_lines(self)
    @api.multi
  • compute_lines(self)
    @api.multi
  • compute_posted_lines(self)
    Recompute the amounts of not finished lines. Useful if rate is changed
  • compute_rate(self, rate, rate_type, method_period)
    @api.model
    Returns the real rate :param rate: Rate :param rate_type: Computation rate :param method_period: Number of months between payments :return:
  • create(self, vals)
    @api.model
  • generate_leasing_entries(self, date)
    @api.model
  • generate_loan_entries(self, date)
    @api.model
    Generate the moves of unfinished loans before date :param date: :return:
  • get_default_name(self, vals)
  • loan_rate(self)
  • new_line_vals(self, sequence, date, amount)
  • post(self)
    @api.multi
  • view_account_invoices(self)
    @api.multi
  • view_account_moves(self)
    @api.multi

New fields (2)
  • date Date
    default=fields.Date.context_today help='Choose the period for which you want to automatically post the depreciation lines of running assets' required=True args: 'Account Date'
  • loan_type Selection
    default='loan' required=True args: [('leasing', 'Leasings'), ('loan', 'Loans')]
Public methods (3)
  • run(self)
    @api.multi
  • run_leasing(self)
  • run_loan(self)

New fields (21)
  • currency_id Many2one → res.currency
    related='loan_id.currency_id' args: 'res.currency'
  • date Date
    help='Date when the payment will be accounted' readonly=True required=True
  • final_pending_principal_amount Monetary
    compute='_compute_amounts' currency_field='currency_id' help='Pending amount of the loan after the payment'
  • has_invoices Boolean
    compute='_compute_has_invoices'
  • has_moves Boolean
    compute='_compute_has_moves'
  • interests_amount Monetary
    currency_field='currency_id' help='Amount of the payment that will be assigned to interests' readonly=True
  • invoice_ids One2many → account.invoice
    inverse_name='loan_line_id' args: 'account.invoice'
  • is_leasing Boolean
    readonly=True related='loan_id.is_leasing'
  • loan_id Many2one → account.loan
    ondelete='cascade' readonly=True required=True args: 'account.loan'
  • loan_state Selection
    readonly=True related='loan_id.state' store=True args: [('draft', 'Draft'), ('posted', 'Posted'), ('cancelled', 'Cancelled'), ('closed', 'Closed')]
  • loan_type Selection
    readonly=True related='loan_id.loan_type' args: [('fixed-annuity', 'Fixed Annuity'), ('fixed-principal', 'Fixed Principal'), ('interest', 'Only interest')]
  • long_term_loan_account_id Many2one → account.account
    readony=True related='loan_id.long_term_loan_account_id' args: 'account.account'
  • long_term_pending_principal_amount Monetary
    currency_field='currency_id' help='Pending amount of the loan before the payment that will not be payed in, at least, 12 months' readonly=True
  • long_term_principal_amount Monetary
    currency_field='currency_id' help='Amount that will reduce the pending loan amount on long term' readonly=True
  • move_ids One2many → account.move
    inverse_name='loan_line_id' args: 'account.move'
  • name Char
    compute='_compute_name'
  • payment_amount Monetary
    currency_field='currency_id' help='Total amount that will be payed (Annuity)' readonly=True
  • pending_principal_amount Monetary
    currency_field='currency_id' help='Pending amount of the loan before the payment' readonly=True
  • principal_amount Monetary
    compute='_compute_amounts' currency_field='currency_id' help='Amount of the payment that will reduce the pending loan amount'
  • rate Float
    digits=(8, 6) readonly=True required=True
  • sequence Integer
    readonly=True required=True
Public methods (14)
  • check_amount(self)
    Recompute amounts if the annuity has not been processed
  • check_move_amount(self)
    @api.multi
    Changes the amounts of the annuity once the move is posted :return:
  • compute_amount(self)
    Computes the payment amount :return: Amount to be payed on the annuity
  • compute_interest(self)
  • generate_invoice(self)
    @api.multi
    Computes invoices of leases :return: list of account.invoice generated
  • generate_move(self)
    @api.multi
    Computes and post the moves of loans :return: list of account.move generated
  • invoice_line_vals(self)
  • invoice_vals(self)
  • move_line_vals(self)
  • move_vals(self)
  • view_account_invoices(self)
    @api.multi
  • view_account_moves(self)
    @api.multi
  • view_account_values(self)
    @api.multi
    Shows the invoice if it is a leasing or the move if it is a loan
  • view_process_values(self)
    @api.multi
    Computes the annuity and returns the result

New fields (6)
  • amount Monetary
    currency_field='currency_id' string='Amount to reduce from Principal'
  • cancel_loan Boolean
    default=False
  • currency_id Many2one → res.currency
    readonly=True related='loan_id.currency_id' args: 'res.currency'
  • date Date
    default=fields.Date.today() required=True
  • fees Monetary
    currency_field='currency_id' string='Bank fees'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (2)
  • new_line_vals(self, sequence)
  • run(self)
    @api.multi

New fields (3)
  • account_id Many2one → account.account
    default=_default_account_id required=True args: 'account.account'
  • journal_id Many2one → account.journal
    default=_default_journal_id required=True args: 'account.journal'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (3)
  • move_line_vals(self)
  • move_vals(self)
  • run(self)
    @api.multi

New fields (2)
  • loan_id Many2one → account.loan
    ondelete='restrict' readonly=True store=True args: 'account.loan'
  • loan_line_id Many2one → account.loan.line
    ondelete='restrict' readonly=True args: 'account.loan.line'
Public methods (1)
  • post(self, invoice=False)
    @api.multi
REPOSITORY
REPOSITORYOCA/account-financial-tools
GIT
GIThttps://github.com/OCA/account-financial-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/account-financial-tools/tree/11.0/account_loan
VERSION
VERSION 1.2.0
CATEGORY
CATEGORYAccounting
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Creu Blanca
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Creu Blanca
COMMITTERS
COMMITTERSGitHub, Enric Tobella, Bhavesh Odedra, OCA Transbot, oca-travis, Weblate
WEBSITE
WEBSITEhttp://github.com/OCA/account-financial-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:23:58
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - account
    - base_setup
    - base
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - web_tour
    - analytic
    - web_planner
    - portal
    - http_routing
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES numpy
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (8)
XML IDNameModelTypeStatus
account_loan_form account.loan.form account.loan form New
account_loan_generate_wizard_form Pay amount account.loan.generate.wizard form New
account_loan_line_form account.loan.line.form account.loan.line form New
account_loan_line_tree account.loan.line.tree account.loan.line tree New
account_loan_pay_amount_form Pay amount account.loan.pay.amount form New
account_loan_post_form Post loan account.loan.post form New
account_loan_tree account.loan.tree account.loan tree New
view_move_form Add to_be_reversed and reversal_id fields account.move field Inherits account.view_move_form
Models touched (7)

New fields (2)
  • loan_id Many2one → account.loan
    ondelete='restrict' readonly=True store=True args: 'account.loan'
  • loan_line_id Many2one → account.loan.line
    ondelete='restrict' readonly=True args: 'account.loan.line'
Public methods (2)
  • action_move_create(self)
    @api.multi
  • finalize_invoice_move_lines(self, move_lines)
    @api.multi

New fields (34)
  • company_id Many2one → res.company
    default=_default_company readonly=True required=True states={'draft': [('readonly', False)]} args: 'res.company'
  • currency_id Many2one → res.currency
    compute='_compute_currency' readonly=True args: 'res.currency'
  • fixed_amount Monetary
    compute='_compute_fixed_amount' currency_field='currency_id'
  • fixed_loan_amount Monetary
    copy=False currency_field='currency_id' default=0 readonly=True
  • fixed_periods Integer
    copy=False default=0 readonly=True
  • interest_expenses_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account where the interests will be assigned to' readonly=True required=True states={'draft': [('readonly', False)]} string='Interests account' args: 'account.account'
  • interests_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id' string='Total interests payed'
  • interests_product_id Many2one → product.product
    help='Product where the amount of interests will be assigned when the invoice is created' string='Interest product' args: 'product.product'
  • is_leasing Boolean
    default=False readonly=True states={'draft': [('readonly', False)]}
  • journal_id Many2one → account.journal
    domain="[('company_id', '=', company_id),('type', '=', journal_type)]" readonly=True required=True states={'draft': [('readonly', False)]} args: 'account.journal'
  • journal_type Char
    compute='_compute_journal_type'
  • leased_asset_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" readonly=True states={'draft': [('readonly', False)]} args: 'account.account'
  • line_ids One2many → account.loan.line
    copy=False inverse_name='loan_id' readonly=True args: 'account.loan.line'
  • loan_amount Monetary
    currency_field='currency_id' readonly=True required=True states={'draft': [('readonly', False)]}
  • loan_type Selection
    default='fixed-annuity' help='Method of computation of the period annuity' readonly=True required=True states={'draft': [('readonly', False)]} args: [('fixed-annuity', 'Fixed Annuity'), ('fixed-principal', 'Fixed Principal'), ('interest', 'Only interest')]
  • long_term_loan_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account that will contain the pending amount on Long term' readonly=True states={'draft': [('readonly', False)]} string='Long term account' args: 'account.account'
  • method_period Integer
    default=1 help='State here the time between 2 depreciations, in months' readonly=True required=True states={'draft': [('readonly', False)]} string='Period Length'
  • move_ids One2many → account.move
    copy=False inverse_name='loan_id' args: 'account.move'
  • name Char
    copy=False default='/' readonly=True required=True states={'draft': [('readonly', False)]}
  • partner_id Many2one → res.partner
    help='Company or individual that lends the money at an interest rate.' readonly=True required=True states={'draft': [('readonly', False)]} string='Lender' args: 'res.partner'
  • payment_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id' string='Total payed amount'
  • payment_on_first_period Boolean
    default=False help='When checked, the first payment will be on start date' readonly=True states={'draft': [('readonly', False)]}
  • pending_principal_amount Monetary
    compute='_compute_total_amounts' currency_field='currency_id'
  • periods Integer
    help='Number of periods that the loan will last' readonly=True required=True states={'draft': [('readonly', False)]}
  • post_invoice Boolean
    default=True help='Invoices will be posted automatically'
  • product_id Many2one → product.product
    help='Product where the amount of the loan will be assigned when the invoice is created' string='Loan product' args: 'product.product'
  • rate Float
    default=0.0 digits=(8, 6) help='Currently applied rate' required=True track_visibility='always'
  • rate_period Float
    compute='_compute_rate_period' digits=(8, 6) help='Real rate that will be applied on each period'
  • rate_type Selection
    default='napr' help='Method of computation of the applied rate' readonly=True required=True states={'draft': [('readonly', False)]} args: [('napr', 'Nominal APR'), ('ear', 'EAR'), ('real', 'Real rate')]
  • residual_amount Monetary
    currency_field='currency_id' default=0.0 help='Residual amount of the lease that must be payed on the end in order to acquire the asset' readonly=True required=True states={'draft': [('readonly', False)]}
  • round_on_end Boolean
    default=False help='When checked, the differences will be applied on the last period, if it is unchecked, the annuity will be recalculated on each period.' readonly=True states={'draft': [('readonly', False)]}
  • short_term_loan_account_id Many2one → account.account
    domain="[('company_id', '=', company_id)]" help='Account that will contain the pending amount on short term' readonly=True required=True states={'draft': [('readonly', False)]} string='Short term account' args: 'account.account'
  • start_date Date
    copy=False help='Start of the moves' readonly=True states={'draft': [('readonly', False)]}
  • state Selection
    copy=False default='draft' required=True args: [('draft', 'Draft'), ('posted', 'Posted'), ('cancelled', 'Cancelled'), ('closed', 'Closed')]
Public methods (15)
  • check_long_term_principal_amount(self)
    Recomputes the long term pending principal of unfinished lines.
  • close(self)
    @api.multi
  • compute_draft_lines(self)
    @api.multi
  • compute_lines(self)
    @api.multi
  • compute_posted_lines(self)
    Recompute the amounts of not finished lines. Useful if rate is changed
  • compute_rate(self, rate, rate_type, method_period)
    @api.model
    Returns the real rate :param rate: Rate :param rate_type: Computation rate :param method_period: Number of months between payments :return:
  • create(self, vals)
    @api.model
  • generate_leasing_entries(self, date)
    @api.model
  • generate_loan_entries(self, date)
    @api.model
    Generate the moves of unfinished loans before date :param date: :return:
  • get_default_name(self, vals)
  • loan_rate(self)
  • new_line_vals(self, sequence, date, amount)
  • post(self)
    @api.multi
  • view_account_invoices(self)
    @api.multi
  • view_account_moves(self)
    @api.multi

New fields (2)
  • date Date
    default=fields.Date.context_today help='Choose the period for which you want to automatically post the depreciation lines of running assets' required=True args: 'Account Date'
  • loan_type Selection
    default='loan' required=True args: [('leasing', 'Leasings'), ('loan', 'Loans')]
Public methods (3)
  • run(self)
    @api.multi
  • run_leasing(self)
  • run_loan(self)

New fields (21)
  • currency_id Many2one → res.currency
    related='loan_id.currency_id' args: 'res.currency'
  • date Date
    help='Date when the payment will be accounted' readonly=True required=True
  • final_pending_principal_amount Monetary
    compute='_compute_amounts' currency_field='currency_id' help='Pending amount of the loan after the payment'
  • has_invoices Boolean
    compute='_compute_has_invoices'
  • has_moves Boolean
    compute='_compute_has_moves'
  • interests_amount Monetary
    currency_field='currency_id' help='Amount of the payment that will be assigned to interests' readonly=True
  • invoice_ids One2many → account.invoice
    inverse_name='loan_line_id' args: 'account.invoice'
  • is_leasing Boolean
    readonly=True related='loan_id.is_leasing'
  • loan_id Many2one → account.loan
    ondelete='cascade' readonly=True required=True args: 'account.loan'
  • loan_state Selection
    readonly=True related='loan_id.state' store=True args: [('draft', 'Draft'), ('posted', 'Posted'), ('cancelled', 'Cancelled'), ('closed', 'Closed')]
  • loan_type Selection
    readonly=True related='loan_id.loan_type' args: [('fixed-annuity', 'Fixed Annuity'), ('fixed-principal', 'Fixed Principal'), ('interest', 'Only interest')]
  • long_term_loan_account_id Many2one → account.account
    readony=True related='loan_id.long_term_loan_account_id' args: 'account.account'
  • long_term_pending_principal_amount Monetary
    currency_field='currency_id' help='Pending amount of the loan before the payment that will not be payed in, at least, 12 months' readonly=True
  • long_term_principal_amount Monetary
    currency_field='currency_id' help='Amount that will reduce the pending loan amount on long term' readonly=True
  • move_ids One2many → account.move
    inverse_name='loan_line_id' args: 'account.move'
  • name Char
    compute='_compute_name'
  • payment_amount Monetary
    currency_field='currency_id' help='Total amount that will be payed (Annuity)' readonly=True
  • pending_principal_amount Monetary
    currency_field='currency_id' help='Pending amount of the loan before the payment' readonly=True
  • principal_amount Monetary
    compute='_compute_amounts' currency_field='currency_id' help='Amount of the payment that will reduce the pending loan amount'
  • rate Float
    digits=(8, 6) readonly=True required=True
  • sequence Integer
    readonly=True required=True
Public methods (13)
  • check_amount(self)
    Recompute amounts if the annuity has not been processed
  • check_move_amount(self)
    @api.multi
    Changes the amounts of the annuity once the move is posted :return:
  • compute_amount(self)
    Computes the payment amount :return: Amount to be payed on the annuity
  • generate_invoice(self)
    @api.multi
    Computes invoices of leases :return: list of account.invoice generated
  • generate_move(self)
    @api.multi
    Computes and post the moves of loans :return: list of account.move generated
  • invoice_line_vals(self)
  • invoice_vals(self)
  • move_line_vals(self)
  • move_vals(self)
  • view_account_invoices(self)
    @api.multi
  • view_account_moves(self)
    @api.multi
  • view_account_values(self)
    @api.multi
    Shows the invoice if it is a leasing or the move if it is a loan
  • view_process_values(self)
    @api.multi
    Computes the annuity and returns the result

New fields (6)
  • amount Monetary
    currency_field='currency_id' string='Amount to reduce from Principal'
  • cancel_loan Boolean
    default=False
  • currency_id Many2one → res.currency
    readonly=True related='loan_id.currency_id' args: 'res.currency'
  • date Date
    default=fields.Date.today() required=True
  • fees Monetary
    currency_field='currency_id' string='Bank fees'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (2)
  • new_line_vals(self, sequence)
  • run(self)
    @api.multi

New fields (3)
  • account_id Many2one → account.account
    default=_default_account_id required=True args: 'account.account'
  • journal_id Many2one → account.journal
    default=_default_journal_id required=True args: 'account.journal'
  • loan_id Many2one → account.loan
    readonly=True required=True args: 'account.loan'
Public methods (3)
  • move_line_vals(self)
  • move_vals(self)
  • run(self)
    @api.multi

New fields (2)
  • loan_id Many2one → account.loan
    ondelete='restrict' readonly=True store=True args: 'account.loan'
  • loan_line_id Many2one → account.loan.line
    ondelete='restrict' readonly=True args: 'account.loan.line'
Public methods (1)
  • post(self)
    @api.multi