Merge pull request #8 from Noviat/16.0

Syncing from upstream Noviat/account_ebics (16.0)
This commit is contained in:
braintec 2023-08-31 07:56:15 +02:00 committed by GitHub
commit f665b5fc45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -4,7 +4,7 @@
{
"name": "account_ebics with OCA Bank Statement Imoort",
"summary": "Use OCA Bank Statement Import with account_ebics",
"version": "16.0.1.0.0",
"version": "16.0.1.0.1",
"author": "Noviat",
"website": "https://www.noviat.com/",
"category": "Hidden",

View File

@ -2,6 +2,7 @@
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
import logging
from datetime import date, datetime
from odoo import _, models
@ -31,7 +32,7 @@ class AccountStatementImport(models.TransientModel):
+ ":\n"
+ message
)
_logger.warn(log_msg)
_logger.warning(log_msg)
return
return super()._check_parsed_data(stmts_vals)
@ -57,12 +58,18 @@ class AccountStatementImport(models.TransientModel):
if result["statement_ids"] == statement_ids:
# no statement has been created, this is the case
# when all transactions have been imported already
if isinstance(st_vals["date"], date) or isinstance(
st_vals["date"], datetime
):
st_date = st_vals["date"].strftime("%Y-%m-%d")
else:
st_date = st_vals["date"]
messages.append(
_(
"Statement %(st_name)s dated %(date)s "
"has already been imported.",
st_name=st_vals["name"],
date=st_vals["date"].strftime("%Y-%m-%d"),
date=st_date,
)
)