mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
add new method to the parser that can be used to provide statement info found in the parsed file
This commit is contained in:
@@ -110,6 +110,14 @@ class BankStatementImportParser(object):
|
|||||||
"""
|
"""
|
||||||
return NotImplementedError
|
return NotImplementedError
|
||||||
|
|
||||||
|
def get_st_vals(self):
|
||||||
|
"""
|
||||||
|
This method return a dict of vals that ca be passed to
|
||||||
|
create method of statement.
|
||||||
|
:return: dict of vals that represent additional infos for the statement
|
||||||
|
"""
|
||||||
|
return {}
|
||||||
|
|
||||||
def get_st_line_vals(self, line, *args, **kwargs):
|
def get_st_line_vals(self, line, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
Implement a method in your parser that must return a dict of vals that can be
|
Implement a method in your parser that must return a dict of vals that can be
|
||||||
|
|||||||
@@ -131,7 +131,9 @@ class AccountStatementProfil(Model):
|
|||||||
Hook to build the values of the statement from the parser and
|
Hook to build the values of the statement from the parser and
|
||||||
the profile.
|
the profile.
|
||||||
"""
|
"""
|
||||||
return {'profile_id': profile_id}
|
vals = {'profile_id': profile_id}
|
||||||
|
vals.update(parser.get_st_vals())
|
||||||
|
return vals
|
||||||
|
|
||||||
def statement_import(self, cr, uid, ids, profile_id, file_stream, ftype="csv", context=None):
|
def statement_import(self, cr, uid, ids, profile_id, file_stream, ftype="csv", context=None):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user