check statement_id exist before adding it to the list we return

This commit is contained in:
florian-dacosta
2014-12-16 12:29:58 +01:00
parent 0a20feecaa
commit 543fcd84a0

View File

@@ -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,