diff options
| author | wan <wan@odoo.com> | 2019-10-18 08:12:29 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-10-21 09:09:11 +0000 |
| commit | 5d835f1f505a9b84704b867c994e432c65229430 (patch) | |
| tree | 230e4c194e7288e413ae074cb46dd91bf728be66 /addons/web/static/tests/fields/basic_fields_tests.js | |
| parent | 08d0a90a51396e4ef2bd023588bb15ee8ec0188f (diff) | |
[FIX] account: prioritize payment ref for matching bank statements
Lets say we have 2 payment references on our invoices:
* `45 RE34Y U0000 00000 02019 00014`
* `45 RE34Y U0000 00000 02019 00022`
A customer pays with the communication: `45 RE34Y U0000 00000 02019 00014`
Before this commit, the query in _get_invoice_matching_query was looking
at the invoice number, the invoice line label, and the vendor reference
all the same way; it was never looking specifically at the payment reference
(which is copied on the receivable line).
This was an issue because the matching was done by keeping only the
digits, grouped by word. If at least one group of digit matched, then
the statement matched with the line.
In our example, both invoices were proposed because `45`, `RE34Y`,
`Ù0000`, `00000` and `02019` matched. (one is enough).
The fix consists of ignoring the lines that match with the number, label
and vendor ref if we find an exact match with the payment reference.
closes odoo/odoo#39102
X-original-commit: 35339bc24b52788e18b57a49f3a0d948f9e466b8
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/tests/fields/basic_fields_tests.js')
0 files changed, 0 insertions, 0 deletions
