Commit 0b7d07a2 authored by Rémi - Le Filament's avatar Rémi - Le Filament
Browse files

Do not split data file to be used by other methods

parent 3dad4182
......@@ -89,8 +89,8 @@ class AccountBankStatementImport(models.TransientModel):
@api.model
def _parse_file(self, data_file):
data_file = data_file.splitlines()
result = self._check_file(data_file)
data_file_split = data_file.splitlines()
result = self._check_file(data_file_split)
if not result:
return super(AccountBankStatementImport, self)._parse_file(
data_file)
......@@ -100,7 +100,7 @@ class AccountBankStatementImport(models.TransientModel):
total_amt = 0.00
try:
index = 0
for line in data_file[5:len(data_file)-1]:
for line in data_file_split[5:len(data_file_split)-1]:
transaction = re.compile(self.regexp_version[file_version]['line_debit']).search(line)
if (transaction != None):
transaction_amount = float(transaction.group('debit').replace(',','.'))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment