[FIX] l10n_be_coda: more lenient detection of CODA files

Some Belgian banks (e.g. CPH) seem to generate CODA
import files that do not comply with the CODA 2.3
(or 2.4 or 2.5) spec, specificially in the header
we use to detect CODA files.
This commit is contained in:
Olivier Dony
2015-03-20 18:02:50 +01:00
parent ca9d671c1d
commit dfbef485c6
@@ -36,7 +36,7 @@ class account_bank_statement_import(osv.TransientModel):
def _check_coda(self, cr, uid, data_file, context=None):
# Matches the first 24 characters of a CODA file, as defined by the febelfin specifications
return re.match('0{5}\d{9}05[ D] {7}', data_file) != None
return re.match('0{5}\d{9}05[ D] +', data_file) != None
def _parse_file(self, cr, uid, data_file, context=None):
if not self._check_coda(cr, uid, data_file, context=context):