From bc7a97dc237e2ca67b9f7a81a2b49b2684a73e27 Mon Sep 17 00:00:00 2001 From: Graeme Gellatly Date: Thu, 16 Aug 2018 01:11:35 +1200 Subject: [PATCH] FIX QIF errors --- account_bank_statement_import_qif/__manifest__.py | 2 +- .../wizards/account_bank_statement_import_qif.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/account_bank_statement_import_qif/__manifest__.py b/account_bank_statement_import_qif/__manifest__.py index b70b5a8..f5fca4d 100644 --- a/account_bank_statement_import_qif/__manifest__.py +++ b/account_bank_statement_import_qif/__manifest__.py @@ -7,7 +7,7 @@ { 'name': 'Import QIF Bank Statements', 'category': 'Accounting', - 'version': '11.0.1.0.0', + 'version': '11.0.1.0.1', 'author': 'OpenERP SA,' 'Tecnativa,' 'Odoo Community Association (OCA)', diff --git a/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py index aa73165..7f9e6fe 100644 --- a/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py +++ b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py @@ -35,7 +35,7 @@ class AccountBankStatementImport(models.TransientModel): transactions = [] vals_line = {} total = 0 - if header == "Bank": + if header in ("Bank", "CCard"): vals_bank_statement = {} for line in data_list: line = line.strip() @@ -58,7 +58,7 @@ class AccountBankStatementImport(models.TransientModel): vals_line['name'] = ('name' in vals_line and vals_line['name'] + ': ' + line[1:] or line[1:]) - elif line[0] == '^': # end of item + elif line[0] == '^' and vals_line: # end of item transactions.append(vals_line) vals_line = {} elif line[0] == '\n':