From 543fcd84a0464dcf72bef7cf6320f5428ba5fcf8 Mon Sep 17 00:00:00 2001 From: florian-dacosta Date: Tue, 16 Dec 2014 12:29:58 +0100 Subject: [PATCH] check statement_id exist before adding it to the list we return --- account_statement_base_import/statement.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/account_statement_base_import/statement.py b/account_statement_base_import/statement.py index 83e250f3..9a9629b5 100644 --- a/account_statement_base_import/statement.py +++ b/account_statement_base_import/statement.py @@ -167,7 +167,8 @@ class AccountStatementProfil(orm.Model): statement_id = self._statement_import( cr, uid, ids, prof, parser, file_stream, ftype=ftype, context=context) - res.append(statement_id) + if statement_id: + res.append(statement_id) return res def _statement_import(self, cr, uid, ids, prof, parser, file_stream,