mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[IMP] add the possibility to specify the bank statement date
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
##############################################################################
|
||||
import base64
|
||||
import csv
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
def UnicodeDictReader(utf8_data, **kwargs):
|
||||
@@ -52,6 +53,7 @@ class BankStatementImportParser(object):
|
||||
self.balance_start = None
|
||||
self.balance_end = None
|
||||
self.statement_name = None
|
||||
self.statement_date = None
|
||||
|
||||
@classmethod
|
||||
def parser_for(cls, parser_name):
|
||||
@@ -177,6 +179,13 @@ class BankStatementImportParser(object):
|
||||
"""
|
||||
return self.statement_name or '/'
|
||||
|
||||
def get_statement_date(self, *args, **kwargs):
|
||||
"""
|
||||
This is called by the importation method to set the statement
|
||||
date in the bank statement.
|
||||
return: float of the balance start (self.balance_start)
|
||||
"""
|
||||
return self.statement_date or datetime.now()
|
||||
|
||||
def itersubclasses(cls, _seen=None):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user