forked from OCA/bank-statement-import
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] account_bank_statement_import_txt_xlsx: CSV
[IMP] add csv meta data management [FIX] exclude footer meta data [IMP] import separated credit/debit column file [FIX] make comptatible with new version of multi_step_wizard module & add migration file [FIX] all not provided value are handled in_parse_decimal method [REF] Remove unnecessary \n
- Loading branch information
1 parent
457a96a
commit e714ff9
Showing
10 changed files
with
289 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
account_bank_statement_import_txt_xlsx/migrations/12.0.3.0.0/post-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Copyright 2020 Akretion | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
from openupgradelib import openupgrade | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
openupgrade.logged_query( | ||
env.cr, | ||
""" | ||
UPDATE account_bank_statement_import_sheet_mapping | ||
SET header_lines_count = 1, | ||
footer_lines_count = 0, | ||
column_names_line = 1; | ||
""" | ||
) | ||
|
||
openupgrade.logged_query( | ||
env.cr, | ||
""" | ||
UPDATE account_bank_statement_import_sheet_mapping | ||
SET amount_type = 'absolute_value' | ||
WHERE debit_credit_column IS NOT NULL; | ||
""" | ||
) | ||
|
||
openupgrade.logged_query( | ||
env.cr, | ||
""" | ||
UPDATE account_bank_statement_import_sheet_mapping | ||
SET amount_type = 'simple_value' | ||
WHERE debit_credit_column IS NULL; | ||
""" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
account_bank_statement_import_txt_xlsx/tests/fixtures/meta_data_separated_credit_debit.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Bank code : 1001010101,Agency Code : 10000,Download start date : 01/04/2020,Download end date : 02/04/2020,, | ||
Account Number : 08088804068,Account Name : Account Owner,: EUR,,, | ||
,,,,, | ||
Balance at end of period,,,,"+31070,11", | ||
Date,Operation Number,Label,Debit,Credit,Detail | ||
01/04/20,UNIQUE OP 1,LABEL 1,"-50,00",,DETAILS 1 | ||
01/04/20,UNIQUE OP 2,LABEL 2,"-100,00",,CLIENTS X | ||
02/04/20,UNIQUE OP 3,LABEL 3,"-80,68",,DETAILS 2 | ||
02/04/20,UNIQUE OP 4,LABEL 4,,"1300,00",DETAILS 3 | ||
Balance at start of period,,,,"+30000,77", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.