|
@ -5,7 +5,7 @@ Created on 16 mai 2016 |
|
|
@author: Thibault Francois (thibault@françois.be) |
|
|
@author: Thibault Francois (thibault@françois.be) |
|
|
''' |
|
|
''' |
|
|
|
|
|
|
|
|
from coda.parser import Parser |
|
|
|
|
|
|
|
|
from coda.parser import Parser, CodaParserException |
|
|
from openerp import models, _ |
|
|
from openerp import models, _ |
|
|
|
|
|
|
|
|
class CodaBankStatementImport(models.TransientModel): |
|
|
class CodaBankStatementImport(models.TransientModel): |
|
@ -60,7 +60,7 @@ class CodaBankStatementImport(models.TransientModel): |
|
|
parser = Parser() |
|
|
parser = Parser() |
|
|
try: |
|
|
try: |
|
|
statements = parser.parse(data_file) |
|
|
statements = parser.parse(data_file) |
|
|
except ValueError: |
|
|
|
|
|
|
|
|
except CodaParserException: |
|
|
return super(CodaBankStatementImport, self)._parse_file(data_file) |
|
|
return super(CodaBankStatementImport, self)._parse_file(data_file) |
|
|
currency_code = False |
|
|
currency_code = False |
|
|
account_number = False |
|
|
account_number = False |
|
|