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/ (+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:

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
=== modified file 'account_statement_base_import/'
--- account_statement_base_import/ 2013-05-31 13:55:06 +0000
+++ account_statement_base_import/ 2014-04-05 09:20:32 +0000
@@ -180,7 +180,7 @@
180 prof = prof_obj.browse(cursor,uid,profile_id,context)180 prof = prof_obj.browse(cursor,uid,profile_id,context)
182 parser = new_bank_statement_parser(prof.import_type, ftype=ftype)182 parser = new_bank_statement_parser(prof.import_type, ftype=ftype)
183 result_row_list = parser.parse(file_stream)183 result_row_list = parser.parse(file_stream, prof)
184 # Check all key are present in !!184 # Check all key are present in !!
185 parsed_cols = parser.get_st_line_vals(result_row_list[0]).keys()185 parsed_cols = parser.get_st_line_vals(result_row_list[0]).keys()
186 for col in parsed_cols:186 for col in parsed_cols:


People subscribed via source and target branches