From dfbef485c6ffb8e4efc2a7becb5ff5995af62283 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Fri, 20 Mar 2015 17:58:44 +0100 Subject: [PATCH] [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. --- addons/l10n_be_coda/wizard/account_coda_import.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_be_coda/wizard/account_coda_import.py b/addons/l10n_be_coda/wizard/account_coda_import.py index 29a642d39ff..0d3d1cf1fa3 100644 --- a/addons/l10n_be_coda/wizard/account_coda_import.py +++ b/addons/l10n_be_coda/wizard/account_coda_import.py @@ -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):