From 75ce7bb6ab5b9108a9eff4656ff5a064f7d790d8 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Fri, 8 Dec 2023 16:56:45 +0100 Subject: [PATCH] [FIX]return warning when processing statement files without transactions module: account_ebics 16.0 --- account_ebics/__manifest__.py | 2 +- account_ebics/models/ebics_file.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/account_ebics/__manifest__.py b/account_ebics/__manifest__.py index 8f66b60..4556b4e 100644 --- a/account_ebics/__manifest__.py +++ b/account_ebics/__manifest__.py @@ -3,7 +3,7 @@ { "name": "EBICS banking protocol", - "version": "16.0.1.7.0", + "version": "16.0.1.7.1", "license": "LGPL-3", "author": "Noviat", "website": "https://www.noviat.com/", diff --git a/account_ebics/models/ebics_file.py b/account_ebics/models/ebics_file.py index 2fb45b1..1861866 100644 --- a/account_ebics/models/ebics_file.py +++ b/account_ebics/models/ebics_file.py @@ -240,6 +240,13 @@ class EbicsFile(models.Model): if statements: statements.write({"import_format": file_format}) statements = self._statement_duplicate_check(res, statements) + else: + notifications.append( + { + "type": "warning", + "message": _("This file doesn't contain any transaction."), + } + ) st_cnt = len(statements) warning_cnt = error_cnt = 0 if notifications: