From 6e03f16ec8b9e3730c14e36b6cecf5b130c54ce4 Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Fri, 5 Jun 2020 11:13:50 +0200 Subject: [PATCH] [IMP] account_bank_statement_import_online: always create a statement --- .../models/online_bank_statement_provider.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/account_bank_statement_import_online/models/online_bank_statement_provider.py b/account_bank_statement_import_online/models/online_bank_statement_provider.py index 9a93a6c7..72fa2d47 100644 --- a/account_bank_statement_import_online/models/online_bank_statement_provider.py +++ b/account_bank_statement_import_online/models/online_bank_statement_provider.py @@ -217,9 +217,12 @@ class OnlineBankStatementProvider(models.Model): statement_date_until, ) if not data: - statement_date_since = statement_date_until - continue + data = ([], {}) lines_data, statement_values = data + if not lines_data: + lines_data = [] + if not statement_values: + statement_values = {} statement = AccountBankStatement.search([ ('journal_id', '=', provider.journal_id.id), ('state', '=', 'open'),