Skip to content
Snippets Groups Projects
Commit ee22c02b authored by Daniel Kosky (dako)'s avatar Daniel Kosky (dako)
Browse files

[FIX] account: bank rec match with empty name


It can be that the name field on the account_move_line is an empty
string (as opposed to NULL). This can happen, for instance, when
generating the payment term line for Switzerland without the appropriate
fields on the company.

Since there are instances when the payment term's name is an empty
string, we can retrieve these lines and automatically match them with
payments from  the bank reconciliation model. This can happen
automatically, with exact matches between a payment with a near-empty
reference (when the payment ref is just "/" or "?", this is sanitized
and ends up as an empty string for the purposes of comparison), and
these empty string payment term invoice lines.

The query that fetches the candidate lines for exact matches already
excludes those lines with a NULL move_line name, move ref, move name.
The natural extension of this behaviour is just to exclude the empty
string in these queries also.

closes odoo/odoo#133005

Signed-off-by: default avatarLaurent Smet (las) <las@odoo.com>
parent 49b91e47
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment