FIX QIF errors

This commit is contained in:
Graeme Gellatly
2018-08-16 01:11:35 +12:00
parent 5d2d79bbfd
commit 27239e40ff
2 changed files with 3 additions and 3 deletions

View File

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

View File

@@ -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':