Skip to content

[ADD] om_account_loan: loans - #210

Merged
github-actions[bot] merged 1 commit into
20.0from
20.0-om_account_loan
Nov 2, 2026
Merged

github-actions[bot] merged 1 commit into
20.0from
20.0-om_account_loan

Conversation

@odoomates

Copy link
Copy Markdown
Owner

Closes #209 (phase 1: loans; leases follow in a second pull request).

Loans for Odoo 20 Community (om_account_loan)

A loan is a contract with its schedule; every movement posts its journal entry.

  • Contract: lender, principal, currency, start and first payment dates, number of payments, monthly / quarterly / semi-annual / annual payments, fixed or floating rate (dated rate changes), accounts (long-term, short-term, interest) and journals. Company defaults in Accounting settings.
  • Schedule: annuity (equal instalments) or fixed principal; interest per period (rate / payments per year) or on actual days / 365; due dates in calendar months (31 Jan, 28/29 Feb, 31 Mar); rounding residue on the last line; unpaid lines editable, paid lines locked.
  • Drawdown in one or more tranches: Dr outstanding receipts / Cr loan; the unpaid schedule follows the principal actually drawn.
  • Payment of an instalment: Dr loan (principal) + Dr interest / Cr outstanding payments.
  • Early or partial repayment: interest to the date, then a lower instalment or a shorter term; a full repayment closes the loan.
  • Current / non-current reclassification at a period end, adjusting what earlier ones moved.
  • Report (Reporting > Management > Loans): outstanding principal, interest accrued, next due date and amount, due within / after 12 months, as list, pivot and PDF; each loan prints with its schedule.
  • Multi-currency (no revaluation yet) and multi-company; accounting administrators post, accountants and auditors read.

Bank side: the bank leg posts to the bank journal's outstanding receipts / payments account, as Odoo payments do, so the bank statement line reconciles with it. An option posts straight to the bank account for companies without statement imports.

Coming in phase 2

Leases with the lessor's vendor bills and an optional right-of-use asset, withholding tax on the interest, import of the lender's schedule. The store page and banner come before the merge.

Tests

41 tests (schedule maths, every entry, tranches, early repayment, floating rate, reclassification, report, currency, access, multi-company) and a browser tour. Reference values, e.g. 100,000 at 6% over 12 monthly payments: instalment 8,606.64, first interest 500.00, total interest 3,279.73.

Testing from this branch

git clone -b 20.0-om_account_loan https://github.com/odoomates/odooapps.git

Install om_account_loan; the demo data has two loans (one floating rate in two tranches, one quarterly with fixed principal).

@odoomates

Copy link
Copy Markdown
Owner Author

Hi @jbpilatre, @gg-vara, @Houssameddine-omar, @ezoer, @jp-sft, @JulioCaesarRBG 👋

You have each helped our accounting apps before (assets, financial reports, fiscal year, budgets), so we thought of you: no obligation at all, only if it interests you.

This PR adds Loans and Leases for Odoo 20 Community (om_account_loan), requested in #209:

  • Loans: annuity or fixed-principal schedules (or imported), drawdowns in tranches, instalments paid from the bank, early repayment, floating rates.
  • Year-end: current/non-current reclassification, monthly if you like.
  • Leases (IFRS 16 style): the liability at the present value of the payments, each payment billed by the lessor. With our Assets app, the right-of-use asset is created and depreciated (om_account_loan_asset).
  • Also: withholding tax on the interest, foreign-currency loans with their exchange difference, a position report and a Loans Analysis, and loans in the cash forecast (om_account_loan_cash_forecast).

It is already being tested on a real lab by @7kulk37. If you have a moment, a second look from your side would be very welcome: a review of the code, a quick install on your Odoo 20, or simply how it fits the way you book loans or leases in your country. Comments here or on #209, whichever you prefer.

To try it:

git clone -b 20.0-om_account_loan https://github.com/odoomates/odooapps.git

then install om_account_loan (and om_account_asset for the right-of-use asset).

Thank you either way, and thanks again for your earlier contributions!

@odoomates
odoomates force-pushed the 20.0-om_account_loan branch 3 times, most recently from 8efbe60 to cc09dd5 Compare November 2, 2026 04:29
Loans and leases for Odoo 20 Community (issue #209).

om_account_loan:
- Loans: amortization schedule (equal instalments, fixed principal or
  imported from CSV/XLSX), drawdowns in tranches, instalments paid from
  the schedule, early repayment (shorter term or lower instalment), fixed
  or floating rate with dated rate changes, foreign currencies with
  exchange differences, withholding tax on the interest.
- Leases: the lease liability at the present value of the payments, the
  lessor's vendor bill on each due date, in the way of IFRS 16.
- Reclassification of the principal due within 12 months, by hand or
  monthly, listed in the Operations tab.
- The terms of a running loan are locked: a new rate is a dated rate
  change, a new term an early repayment.
- Reports: Loans and Leases at a date (screen, PDF in landscape), the
  loan schedule in PDF, the Loans Analysis pivot and graph.
- Protection: posted lines and operations, lock dates, accountant role.
- Store page, banner and screenshots, with a section for the users of
  Cash Forecast and Assets Management (add the bridge).

om_account_loan_asset: the right-of-use asset of a lease, created at its
recognition and depreciated over the lease term.

om_account_loan_cash_forecast: the unpaid instalments and the lease
payments in the cash forecast; om_account_cash_forecast gets a hook to
add rows to the forecast.

om_account_accountant: its store page presents the new app (a section
and a card), and the new app opens the GIF of the Odoo Mates apps.
@odoomates
odoomates force-pushed the 20.0-om_account_loan branch from cc09dd5 to dd7ae9d Compare November 2, 2026 04:47
@odoomates
odoomates marked this pull request as ready for review November 2, 2026 04:48
@odoomates

Copy link
Copy Markdown
Owner Author

/mergebot r+

@github-actions
github-actions Bot merged commit ce4af48 into 20.0 Nov 2, 2026
2 checks passed
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Merging now.

@odoomates
odoomates deleted the 20.0-om_account_loan branch November 2, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request: Loan & Lease management module for Odoo 20 Community

1 participant