mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[PEP8]
This commit is contained in:
@@ -139,15 +139,15 @@ class AccountStatementProfil(Model):
|
|||||||
def multi_statement_import(self, cr, uid, ids, profile_id, file_stream,
|
def multi_statement_import(self, cr, uid, ids, profile_id, file_stream,
|
||||||
ftype="csv", context=None):
|
ftype="csv", context=None):
|
||||||
"""
|
"""
|
||||||
Create multiple bank statements from values given by the parser for the given
|
Create multiple bank statements from values given by the parser for the
|
||||||
profile.
|
givenprofile.
|
||||||
|
|
||||||
:param int/long profile_id: ID of the profile used to import the file
|
:param int/long profile_id: ID of the profile used to import the file
|
||||||
:param filebuffer file_stream: binary of the providen file
|
:param filebuffer file_stream: binary of the providen file
|
||||||
:param char: ftype represent the file exstension (csv by default)
|
:param char: ftype represent the file exstension (csv by default)
|
||||||
:return: list: list of ids of the created account.bank.statemênt
|
:return: list: list of ids of the created account.bank.statemênt
|
||||||
"""
|
"""
|
||||||
prof_obj = self.pool.get('account.statement.profile')
|
prof_obj = self.pool['account.statement.profile']
|
||||||
if not profile_id:
|
if not profile_id:
|
||||||
raise osv.except_osv(_("No Profile!"),
|
raise osv.except_osv(_("No Profile!"),
|
||||||
_("You must provide a valid profile to import a bank statement!"))
|
_("You must provide a valid profile to import a bank statement!"))
|
||||||
@@ -156,7 +156,8 @@ class AccountStatementProfil(Model):
|
|||||||
parser = new_bank_statement_parser(prof.import_type, ftype=ftype)
|
parser = new_bank_statement_parser(prof.import_type, ftype=ftype)
|
||||||
res = []
|
res = []
|
||||||
for result_row_list in parser.parse(file_stream):
|
for result_row_list in parser.parse(file_stream):
|
||||||
statement_id = self._statement_import(cr, uid, ids, prof, parser, file_stream, ftype=ftype, context=context)
|
statement_id = self._statement_import(cr, uid, ids, prof, parser,
|
||||||
|
file_stream, ftype=ftype, context=context)
|
||||||
res.append(statement_id)
|
res.append(statement_id)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user