[15.0]account_ebics_oe_statement_import - fix handling of notifications

This commit is contained in:
Luc De Meyer
2023-10-08 22:19:22 +02:00
parent fb1f214d88
commit cc3f1a48b7
4 changed files with 19 additions and 10 deletions

View File

@@ -3,7 +3,7 @@
{
"name": "EBICS banking protocol",
"version": "15.0.1.1.3",
"version": "15.0.1.1.4",
"license": "LGPL-3",
"author": "Noviat",
"website": "https://www.noviat.com/",

View File

@@ -169,7 +169,7 @@ class EbicsFile(models.Model):
return False
return True
def _process_result_action(self, res_action):
def _process_result_action(self, res_action): # noqa: C901
notifications = []
st_line_ids = []
statement_ids = []
@@ -219,9 +219,13 @@ class EbicsFile(models.Model):
error_cnt += 1
elif notif["type"] == "warning":
warning_cnt += 1
parts = [
notif[k] for k in notif if k in ("message", "details") and notif[k]
]
parts = []
if notif.get("message"):
parts.append(notif["message"])
if notif.get("details"):
for k in ("name", "model", "ids"):
if notif["details"][k]:
parts.append(str(notif["details"][k]))
self.note_process += "\n".join(parts)
self.note_process += "\n\n"
if error_cnt: