← Back to team overview

banking-addons-team team mailing list archive

lp:~akretion-team/banking-addons/bank-statement-reconcile-70-multi-statement into lp:banking-addons/bank-statement-reconcile-7.0

 

Sébastien BEAU - http://www.akretion.com has proposed merging lp:~akretion-team/banking-addons/bank-statement-reconcile-70-multi-statement into lp:banking-addons/bank-statement-reconcile-7.0.

Requested reviews:
  Nicolas Bessi - Camptocamp (nbessi-c2c)
  Frederic Clementi - Camptocamp (frederic-clementi)

For more details, see:
https://code.launchpad.net/~akretion-team/banking-addons/bank-statement-reconcile-70-multi-statement/+merge/197761

Hi,
In some case like the CFONB norme (French norme) many bank statement can be extracted from the same file.
So I need to change the signature in order to always work with a list of id, than in my can I am able to inherit everything and process all of my bank statement (http://bazaar.launchpad.net/~akretion-team/+junk/account_statement_cfonb/view/head:/account_statement_cfonb/statement.py)

-- 
https://code.launchpad.net/~akretion-team/banking-addons/bank-statement-reconcile-70-multi-statement/+merge/197761
Your team Banking Addons Core Editors is subscribed to branch lp:banking-addons/bank-statement-reconcile-7.0.
=== modified file 'account_statement_base_import/statement.py'
--- account_statement_base_import/statement.py	2013-09-12 09:05:01 +0000
+++ account_statement_base_import/statement.py	2013-12-04 17:31:08 +0000
@@ -147,7 +147,7 @@
         prof = prof_obj.browse(cr, uid, profile_id, context=context)
 
         parser = new_bank_statement_parser(prof.import_type, ftype=ftype)
-        result_row_list = parser.parse(file_stream)
+        result_row_list = parser.parse(file_stream, context=context)
         # Check all key are present in account.bank.statement.line!!
         if not result_row_list:
             raise osv.except_osv(_("Nothing to import"),
@@ -213,4 +213,4 @@
             st += ''.join(traceback.format_tb(trbk, 30))
             raise osv.except_osv(_("Statement import error"),
                                  _("The statement cannot be created: %s") % st)
-        return statement_id
+        return [statement_id]

=== modified file 'account_statement_base_import/wizard/import_statement.py'
--- account_statement_base_import/wizard/import_statement.py	2013-07-08 18:03:34 +0000
+++ account_statement_base_import/wizard/import_statement.py	2013-12-04 17:31:08 +0000
@@ -111,5 +111,5 @@
         action_obj = self.pool.get('ir.actions.act_window')
         action_id = model_obj.get_object_reference(cr, uid, 'account', 'action_bank_statement_tree')[1]
         res = action_obj.read(cr, uid, action_id)
-        res['domain'] = res['domain'][:-1] + ",('id', '=', %d)]" % sid
+        res['domain'] = res['domain'][:-1] + ",('id', 'in', %s)]" % sid
         return res