mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[MIG] Forward port of lp:banking-addons/6.1, rev. 166
[FIX] Do not match on very short signatures
This commit is contained in:
@@ -181,7 +181,7 @@ class banking_import_transaction(orm.Model):
|
||||
Match on ID of invoice (reference, name or number, whatever
|
||||
available and sensible)
|
||||
'''
|
||||
if invoice.reference:
|
||||
if invoice.reference and len(invoice.reference) > 2:
|
||||
# Reference always comes first, as it is manually set for a
|
||||
# reason.
|
||||
iref = invoice.reference.upper()
|
||||
@@ -189,7 +189,7 @@ class banking_import_transaction(orm.Model):
|
||||
return True
|
||||
if invoice.type.startswith('in_'):
|
||||
# Internal numbering, no likely match on number
|
||||
if invoice.name:
|
||||
if invoice.name and len(invoice.name) > 2:
|
||||
iname = invoice.name.upper()
|
||||
if iname in ref or iname in msg:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user