Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Le Filament
account_bank_statement_import_bpce
Commits
0b7d07a2
Commit
0b7d07a2
authored
Nov 19, 2020
by
Rémi - Le Filament
Browse files
Do not split data file to be used by other methods
parent
3dad4182
Changes
1
Hide whitespace changes
Inline
Side-by-side
wizard/account_bank_statement_import.py
View file @
0b7d07a2
...
...
@@ -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
(
','
,
'.'
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment