OdooWiki OCA HUB

Payment Counterpart Lines

account_payment_line folder_open OCA/account-payment open_in_new
Account License: AGPL-3

This module is an utility module to add lines in payment, allowing users make more complicated cases when processing payments, split on many invoices, set up specific write-off and adding some analytic information

Add tool to proposal of payment distributions, ordering by due date

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Adds a "Counterpart Lines" tab to payments so you can split a payment across several invoices, add extra lines (fees, commissions, interest) and set write-off accounts. A button proposes the distribution automatically, oldest due date first.

On the payment form (Customer/Supplier Payments) you get a new "Counterpart Lines" tab and a "Write-off Account" field. In that tab you list, line by line, which invoice or journal item the payment should settle, on which account, with which amount, and optionally an analytic account.

  • "Propose Payment Distribution" fills the tab automatically: it looks for open, posted invoices or bills of the same partner, ordered by due date, and applies the payment amount from the oldest due date onwards. "Delete Counterpart Lines" clears the tab while the payment is still in draft.
  • When you pick a journal entry or a journal item, the account, partner and amount are filled in automatically, and the amount is capped by the remaining balance: an error is raised if you enter more than what is still due on the invoice.
  • If a line is marked "Fully Paid?", the difference between the invoice residual and the amount you enter becomes a write-off. A write-off account must be set either on the line or in the payment header, otherwise posting is blocked.
  • On posting, the payment's journal entry is rebuilt from these lines, and the matched invoice items are reconciled automatically. Going back to draft removes those generated journal items.

The module touches account.payment, account.move.line and adds a new counterpart line model, visible only to accounting users.

Depends on

account_payment

Required by other modules

Models and fields (4)
  • account.payment · extends an existing modelwriteoff_account_id (Write-off Account), line_payment_counterpart_ids (Counterpart Lines)
  • account.move.line · extends an existing modelpayment_line_id (Payment line)
  • account.payment.counterpart.line · new modelpayment_id (Payment)
  • account.payment.counterpart.line.abstract · new modelname (Description), aml_id (Journal Item to Reconcile), amount, move_id (Journal Entry), move_ids (Journal Entries Created), account_id (Account), company_id, fully_paid (Fully Paid?), partner_id (Partner), currency_id (Currency), amount_currency (Amount in Company Currency), writeoff_amount, aml_date_maturity (Date Maturity), aml_amount_residual (Amount Residual), analytic_account_id (Analytic Account), writeoff_account_id (Write-off account), commercial_partner_id, residual_after_payment, writeoff_amount_currency, aml_amount_residual_currency (Amount Residual Currency), residual_after_payment_currency

Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 3 confirmed, 6 with no information of 9 versions.

Sources · Odoo 16.0

Confirmed on 2026-11-03 in branch 16.0 of OCA/account-payment.

terminal Installation and usage

OCA documentation · Odoo 18.0

You can use payment distribution suggestion, and if system found moves pending to reconcile related with partner selected, system will create all lines trying to pay all invoices until amount remain

You can add manually lines, if payment don't detect lines specified, payment works as a normal payment

No verified information in OCA: Installation, Configuration.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.