Merge lp:~pedro.baeza/banking-addons/6.1-bank-statement-reconcile-prof_parsing into lp:banking-addons/bank-statement-reconcile-61

Proposed by Pedro Manuel Baeza
Status: Needs review
Proposed branch: lp:~pedro.baeza/banking-addons/6.1-bank-statement-reconcile-prof_parsing
Merge into: lp:banking-addons/bank-statement-reconcile-61
Diff against target: 12 lines (+1/-1)
1 file modified
account_statement_base_import/statement.py (+1/-1)
To merge this branch: bzr merge lp:~pedro.baeza/banking-addons/6.1-bank-statement-reconcile-prof_parsing
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) Needs Information
Review via email: mp+214377@code.launchpad.net

Commit message

[IMP] account_statement_base_import: Allow to use profile data for customizing parsing

Description of the change

Simple improvement on the account_statement_base_import module to have profile data on parse method to use it to customize parsing with, for example, a parameter introduced on profiles.

There is no need to do it anything more, because parse method already contains *args and **kwargs. You can access profile data with args[0] in parse method.

To post a comment you must log in.
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Maybe you want to make it a keyword argument, to prevent confusion when other modules apply the same mechanism for a different purpose?

review: Needs Information

Unmerged revisions

84. By Pedro Manuel Baeza

[IMP] account_statement_base_import: Allow to use profile data for customizing parsing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_statement_base_import/statement.py'
2--- account_statement_base_import/statement.py 2013-05-31 13:55:06 +0000
3+++ account_statement_base_import/statement.py 2014-04-05 09:20:32 +0000
4@@ -180,7 +180,7 @@
5 prof = prof_obj.browse(cursor,uid,profile_id,context)
6
7 parser = new_bank_statement_parser(prof.import_type, ftype=ftype)
8- result_row_list = parser.parse(file_stream)
9+ result_row_list = parser.parse(file_stream, prof)
10 # Check all key are present in account.bank.statement.line !!
11 parsed_cols = parser.get_st_line_vals(result_row_list[0]).keys()
12 for col in parsed_cols:

Subscribers

People subscribed via source and target branches