mirror of
https://github.com/brain-tec/account_ebics.git
synced 2024-11-23 20:52:04 +00:00
Merge branch '15-fix-oe-statement-import' into '15.0'
[15.0]account_ebics_oe_statement_import - fix handling of notifications See merge request Noviat/Noviat_Generic/accounting-ebics!12
This commit is contained in:
commit
5c2c597456
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "EBICS banking protocol",
|
"name": "EBICS banking protocol",
|
||||||
"version": "15.0.1.1.3",
|
"version": "15.0.1.1.4",
|
||||||
"license": "LGPL-3",
|
"license": "LGPL-3",
|
||||||
"author": "Noviat",
|
"author": "Noviat",
|
||||||
"website": "https://www.noviat.com/",
|
"website": "https://www.noviat.com/",
|
||||||
|
@ -169,7 +169,7 @@ class EbicsFile(models.Model):
|
|||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _process_result_action(self, res_action):
|
def _process_result_action(self, res_action): # noqa: C901
|
||||||
notifications = []
|
notifications = []
|
||||||
st_line_ids = []
|
st_line_ids = []
|
||||||
statement_ids = []
|
statement_ids = []
|
||||||
@ -219,9 +219,13 @@ class EbicsFile(models.Model):
|
|||||||
error_cnt += 1
|
error_cnt += 1
|
||||||
elif notif["type"] == "warning":
|
elif notif["type"] == "warning":
|
||||||
warning_cnt += 1
|
warning_cnt += 1
|
||||||
parts = [
|
parts = []
|
||||||
notif[k] for k in notif if k in ("message", "details") and notif[k]
|
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".join(parts)
|
||||||
self.note_process += "\n\n"
|
self.note_process += "\n\n"
|
||||||
if error_cnt:
|
if error_cnt:
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# Copyright 2020-2022 Noviat.
|
# Copyright 2020-2023 Noviat.
|
||||||
# License LGPL-3 or later (http://www.gnu.org/licenses/lpgl).
|
# License LGPL-3 or later (http://www.gnu.org/licenses/lpgl).
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "account_ebics with Odoo Enterprise Bank Statement Import",
|
"name": "account_ebics with Odoo Enterprise Bank Statement Import",
|
||||||
"summary": "Use Odoo Enterprise Bank Statement Import with account_ebics",
|
"summary": "Use Odoo Enterprise Bank Statement Import with account_ebics",
|
||||||
"version": "15.0.1.0.0",
|
"version": "15.0.1.0.1",
|
||||||
"author": "Noviat",
|
"author": "Noviat",
|
||||||
"website": "https://www.noviat.com/",
|
"website": "https://www.noviat.com/",
|
||||||
"category": "Hidden",
|
"category": "Hidden",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright 2009-2020 Noviat.
|
# Copyright 2009-2023 Noviat.
|
||||||
# License LGPL-3 or later (http://www.gnu.org/licenses/lpgl).
|
# License LGPL-3 or later (http://www.gnu.org/licenses/lpgl).
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
@ -53,8 +53,13 @@ class AccountBankStatementImport(models.TransientModel):
|
|||||||
break
|
break
|
||||||
if not transactions:
|
if not transactions:
|
||||||
message = _("This file doesn't contain any transaction.")
|
message = _("This file doesn't contain any transaction.")
|
||||||
|
st_ids = []
|
||||||
st_line_ids = []
|
st_line_ids = []
|
||||||
notifications = {"type": "warning", "message": message, "details": ""}
|
notifications = {
|
||||||
return st_line_ids, [notifications]
|
"type": "warning",
|
||||||
|
"message": message,
|
||||||
|
"details": {"name": "", "model": "", "ids": []},
|
||||||
|
}
|
||||||
|
return st_ids, st_line_ids, [notifications]
|
||||||
|
|
||||||
return super()._create_bank_statements(stmts_vals)
|
return super()._create_bank_statements(stmts_vals)
|
||||||
|
Loading…
Reference in New Issue
Block a user