mirror of
				https://github.com/brain-tec/account_ebics.git
				synced 2025-11-04 07:00:35 +00:00 
			
		
		
		
	Merge pull request #8 from Noviat/16.0
Syncing from upstream Noviat/account_ebics (16.0)
This commit is contained in:
		@@ -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",
 | 
			
		||||
 
 | 
			
		||||
@@ -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,
 | 
			
		||||
                            )
 | 
			
		||||
                        )
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user