~therp-nl/banking-addons/ba61-lp1246642

« back to all changes in this revision

Viewing changes to account_banking/banking_import_transaction.py

  • Committer: Guewen Baconnier
  • Author(s): Stefan Rijnhart
  • Date: 2013-04-29 06:50:26 UTC
  • mfrom: (165.1.1 bashort)
  • Revision ID: guewen.baconnier@camptocamp.com-20130429065026-6ki1v05orzx5uq8o
[FIX] Do not match on very short signatures

Show diffs side-by-side

added added

removed removed

Lines of Context:
222
222
            Match on ID of invoice (reference, name or number, whatever
223
223
            available and sensible)
224
224
            '''
225
 
            if invoice.reference:
 
225
            if invoice.reference and len(invoice.reference) > 2:
226
226
                # Reference always comes first, as it is manually set for a
227
227
                # reason.
228
228
                iref = invoice.reference.upper()
230
230
                    return True
231
231
            if invoice.type.startswith('in_'):
232
232
                # Internal numbering, no likely match on number
233
 
                if invoice.name:
 
233
                if invoice.name and len(invoice.name) > 2:
234
234
                    iname = invoice.name.upper()
235
235
                    if iname in ref or iname in msg:
236
236
                        return True