Files
odoo-cooltools/dlv_account_reconciliation_rest_amount/README.md
T

56 lines
2.3 KiB
Markdown

# dlv_account_reconciliation_rest_amount
## Overview
`dlv_account_reconciliation_rest_amount` extends the bank reconciliation
widget (Accounting → Reconciliation, model `bank.rec.widget`) so the still
outstanding ("rest") amount of a partially matched line is shown in
parentheses next to its total.
On the reconciliation screen, when an added invoice/bill (a `new_aml` line)
is only partially used to close the statement line, Odoo shows the full
source amount struck through below the amount actually used — but not what
remains unmatched on that line. This addon adds that missing number, e.g.:
```
€ 1.899,97
€ 4.486,35 (€ 2.586,38)
```
so the user immediately sees that €2.586,38 of that invoice is still
outstanding, without having to search for it elsewhere.
## How it works
- `models/bank_rec_widget_line.py` inherits `bank.rec.widget.line` and adds
two computed `Monetary` fields, `rest_debit` and `rest_credit`
(`source_balance - balance`, split like the existing `debit`/`credit`
fields). Because `bank.rec.widget._compute_lines_widget` automatically
serializes every field of `bank.rec.widget.line` to the front-end, these
two fields become available client-side as `line.rest_debit` /
`line.rest_credit` (each with `.display`, `.value`, `.is_zero`) with no
extra plumbing needed.
- `static/src/xml/reconciliation_rest_amount.xml` extends the OWL template
`account_accountant.bank_rec_widget_form_lines_widget`
(`t-inherit-mode="extension"`) and prints the rest amount in parentheses
next to the struck-through source amount, when it is non-zero.
### Note on the bank movement itself
Earlier iterations of this addon assumed the bank movement (liquidity) line
could also show a "rest" amount, based on the legacy (pre-16.4) reconciliation
widget where that concept existed. In the `bank.rec.widget` model actually
used on this instance, the liquidity line always reflects the full statement
line amount — there is no partial/rest concept for it, so nothing is shown
there. See ROADMAP.md.
## Dependencies
- `account_accountant`
## Installation
Standard addon install/update (`-u dlv_account_reconciliation_rest_amount`).
No configuration or data is added; the change is a new computed field plus a
purely visual template extension on the existing reconciliation widget.