dlv_account_reconciliation_rest_amount: rest op eigen regel + scope verduidelijkt

- Toon het restbedrag als "(rest: € ...)" op een eigen regel boven het
  ingezette bedrag i.p.v. inline ernaast.
- Manifest summary/description, README (nieuwe Scope-sectie) en CHANGELOG
  aangescherpt: addon dekt enkel gedeeltelijk afgepunte facturen; de
  bankbewegingsregel en het betalingsoverschot (open balance) zijn buiten
  scope.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Kristof Bernaert
2026-09-08 07:16:01 +02:00
co-authored by Claude Opus 4.8
parent b73d268edb
commit 5f3939e836
4 changed files with 40 additions and 14 deletions
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- Initial release. - Initial release.
- Show the rest (still open) amount in parentheses on the bank - Show the rest (still open / residual) amount in parentheses on the bank
reconciliation screen, for both the bank movement line and any partially reconciliation screen, next to any partially used added invoice/bill line
used added invoice/bill line. (i.e. an invoice whose full amount is larger than the part used to close
the statement line). The bank movement (liquidity) line and the auto-created
suspense/open-balance line are out of scope — see README.md.
@@ -20,6 +20,22 @@ remains unmatched on that line. This addon adds that missing number, e.g.:
so the user immediately sees that €2.586,38 of that invoice is still so the user immediately sees that €2.586,38 of that invoice is still
outstanding, without having to search for it elsewhere. outstanding, without having to search for it elsewhere.
## Scope
This addon covers exactly one case: an added invoice/bill line that is only
**partially** used to close the statement line (invoice amount > amount used).
The number shown is that invoice's residual / still-open amount
(`amount_residual`, "restbedrag / openstaand saldo").
Explicitly **out of scope**:
- The bank movement (liquidity) line — always reflects the full statement line
amount; there is no partial/rest concept for it (see note below).
- The opposite case, where the payment is *larger* than the matched invoice(s)
and the surplus is auto-posted to the suspense/waiting account as an "open
balance" line. That surplus is a property of the statement line, not of a
partially used invoice, so this addon does not annotate it.
## How it works ## How it works
- `models/bank_rec_widget_line.py` inherits `bank.rec.widget.line` and adds - `models/bank_rec_widget_line.py` inherits `bank.rec.widget.line` and adds
@@ -1,13 +1,19 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
{ {
"name": "Reconciliation Rest Amount", "name": "Reconciliation Rest Amount",
"summary": "Toon het restbedrag tussen haakjes op het afletterscherm " "summary": "Toon het restbedrag (openstaand saldo) van een gedeeltelijk "
"(bank reconciliatie)", "afgepunte factuur tussen haakjes op het bank-afletterscherm",
"description": """ "description": """
Voegt het restbedrag (verschil tussen het volledige bronbedrag en het bedrag Voegt het restbedrag (openstaand saldo = verschil tussen het volledige
dat effectief wordt ingezet) tussen haakjes toe op het bank-afletterscherm bronbedrag van de factuur en het bedrag dat effectief wordt ingezet) tussen
(bank.rec.widget), naast een gedeeltelijk gematchte afletteringsregel haakjes toe op het bank-afletterscherm (bank.rec.widget), naast een
(bv. een factuur waarvan niet het volledige bedrag wordt gebruikt). gedeeltelijk gematchte afletteringsregel — een factuur/kostenboeking waarvan
niet het volledige bedrag wordt gebruikt om de afschriftregel af te punten
(factuur > gebruikt bedrag).
Buiten scope: de bankbewegingsregel zelf (toont altijd het volledige
afschriftbedrag) en het overschot van een betaling dat op de wachtrekening /
suspense-rekening ("open balance") belandt.
""", """,
"author": "bv Domus La Vila", "author": "bv Domus La Vila",
"website": "https://domuslavila.eu", "website": "https://domuslavila.eu",
@@ -18,9 +18,11 @@
De bovenste rij gebruikt t-out als attribuut rechtstreeks op de De bovenste rij gebruikt t-out als attribuut rechtstreeks op de
<td> (geen child-elementen), en t-out overschrijft de volledige <td> (geen child-elementen), en t-out overschrijft de volledige
inhoud van het element. Om er toch een extra <span> naast te inhoud van het element. Om er toch een extra regel te kunnen tonen,
kunnen tonen, vervangen we de <td> volledig door een variant met vervangen we de <td> volledig door een variant met onze rest-regel
de waarde in een child-<t>, gevolgd door onze rest-span. als aparte blok-<span> ("(rest: € ...)") bovenaan, gevolgd door de
eigenlijke waarde in een child-<t>. Zo staat de rest op een eigen
regel boven het ingezette bedrag i.p.v. ernaast.
--> -->
<t t-name="dlv_account_reconciliation_rest_amount.bank_rec_widget_form_lines_widget" <t t-name="dlv_account_reconciliation_rest_amount.bank_rec_widget_form_lines_widget"
t-inherit="account_accountant.bank_rec_widget_form_lines_widget" t-inherit="account_accountant.bank_rec_widget_form_lines_widget"
@@ -29,15 +31,15 @@
<xpath expr="(//td[@field='debit'])[1]" position="replace"> <xpath expr="(//td[@field='debit'])[1]" position="replace">
<td class="o_data_cell o_field_cell o_list_number" field="debit"> <td class="o_data_cell o_field_cell o_list_number" field="debit">
<span t-if="!line.rest_debit.is_zero" class="dlv_rest_amount text-muted d-block small" title="Nog te matchen">(rest: <t t-out="line.rest_debit.display"/>)</span>
<t t-if="!line.debit.is_zero" t-out="line.debit.display"/> <t t-if="!line.debit.is_zero" t-out="line.debit.display"/>
<span t-if="!line.rest_debit.is_zero" class="dlv_rest_amount text-muted ms-1" title="Nog te matchen"> (<t t-out="line.rest_debit.display"/>)</span>
</td> </td>
</xpath> </xpath>
<xpath expr="(//td[@field='credit'])[1]" position="replace"> <xpath expr="(//td[@field='credit'])[1]" position="replace">
<td class="o_data_cell o_field_cell o_list_number" field="credit"> <td class="o_data_cell o_field_cell o_list_number" field="credit">
<span t-if="!line.rest_credit.is_zero" class="dlv_rest_amount text-muted d-block small" title="Nog te matchen">(rest: <t t-out="line.rest_credit.display"/>)</span>
<t t-if="!line.credit.is_zero" t-out="line.credit.display"/> <t t-if="!line.credit.is_zero" t-out="line.credit.display"/>
<span t-if="!line.rest_credit.is_zero" class="dlv_rest_amount text-muted ms-1" title="Nog te matchen"> (<t t-out="line.rest_credit.display"/>)</span>
</td> </td>
</xpath> </xpath>