Monday, January 11, 2021
1 change · master
Resolved issues and error corrections
Bank reconciliation rules now correctly apply write-offs when automatically matching payments to invoices, preventing small remaining balances from staying open. Statement lines without a customer or vendor are also assigned the right partner when matched, improving payment status accuracy and reducing manual cleanup.
Original PR description
[FIX] account: reconciliation models: make auto_reconcile rules work properly with write-offs - Create an invoice for 100 - Create a bank statement for 95 - Setup your reconciliation model so that it…
[FIX] account: reconciliation models: make auto_reconcile rules work properly with write-offs - Create an invoice for 100 - Create a bank statement for 95 - Setup your reconciliation model so that it will match them and create a write-off for the remaining 5. Make it auto_reconciled. => Doing that, we expect the bank journal move to be created like this: - 100 on payable/receivable, reconciled with the invoice - 95 on the bank account - 5 on the write-off account This wasn't the case. Instead, Odoo created the following (correct from an accounting point of view, but weird): - 95 on payable/receivable, reconciled with the invoice - 5 on payable/receivable, not reconciled - 95 on the bank account - 5 on the write-off account => So an open balance of 5 was actually created. This was weird, and also caused an additional bug, as only the first payable/receivable line was reconciled with the invoice, making it only partially paid. This commit restores the expected behavior. [FIX] account: reconcile models: create write-offs properly when matching a statement line with no partner Before that, write-offs were simply never created in this case ; only an open balance. This was (obviously) wrong. Also, the partner set on the statement line was not modified, and kept empty. We fix that so that, when a statement line without is reconciled with lines sharing the same partner, this partner is also assigned to the statement line. Task 2423231