mirror of
https://github.com/brain-tec/account_ebics.git
synced 2024-11-27 14:37:25 +00:00
Merge pull request #8 from Noviat/16.0
Syncing from upstream Noviat/account_ebics (16.0)
This commit is contained in:
commit
f665b5fc45
@ -4,7 +4,7 @@
|
|||||||
{
|
{
|
||||||
"name": "account_ebics with OCA Bank Statement Imoort",
|
"name": "account_ebics with OCA Bank Statement Imoort",
|
||||||
"summary": "Use OCA Bank Statement Import with account_ebics",
|
"summary": "Use OCA Bank Statement Import with account_ebics",
|
||||||
"version": "16.0.1.0.0",
|
"version": "16.0.1.0.1",
|
||||||
"author": "Noviat",
|
"author": "Noviat",
|
||||||
"website": "https://www.noviat.com/",
|
"website": "https://www.noviat.com/",
|
||||||
"category": "Hidden",
|
"category": "Hidden",
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
|
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
from datetime import date, datetime
|
||||||
|
|
||||||
from odoo import _, models
|
from odoo import _, models
|
||||||
|
|
||||||
@ -31,7 +32,7 @@ class AccountStatementImport(models.TransientModel):
|
|||||||
+ ":\n"
|
+ ":\n"
|
||||||
+ message
|
+ message
|
||||||
)
|
)
|
||||||
_logger.warn(log_msg)
|
_logger.warning(log_msg)
|
||||||
return
|
return
|
||||||
return super()._check_parsed_data(stmts_vals)
|
return super()._check_parsed_data(stmts_vals)
|
||||||
|
|
||||||
@ -57,12 +58,18 @@ class AccountStatementImport(models.TransientModel):
|
|||||||
if result["statement_ids"] == statement_ids:
|
if result["statement_ids"] == statement_ids:
|
||||||
# no statement has been created, this is the case
|
# no statement has been created, this is the case
|
||||||
# when all transactions have been imported already
|
# 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(
|
messages.append(
|
||||||
_(
|
_(
|
||||||
"Statement %(st_name)s dated %(date)s "
|
"Statement %(st_name)s dated %(date)s "
|
||||||
"has already been imported.",
|
"has already been imported.",
|
||||||
st_name=st_vals["name"],
|
st_name=st_vals["name"],
|
||||||
date=st_vals["date"].strftime("%Y-%m-%d"),
|
date=st_date,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user