← Back to team overview

banking-addons-team team mailing list archive

[Merge] lp:~camptocamp/banking-addons/bank-statement-reconcile-7.0-fix-default-lep into lp:banking-addons/bank-statement-reconcile-7.0

 

Leonardo Pistone - camptocamp has proposed merging lp:~camptocamp/banking-addons/bank-statement-reconcile-7.0-fix-default-lep into lp:banking-addons/bank-statement-reconcile-7.0.

Requested reviews:
  Banking Addons Core Editors (banking-addons-team)
Related bugs:
  Bug #1300862 in Banking Addons: "account_statement_cancel_line + account_statement_base_import: field "state" not defined"
  https://bugs.launchpad.net/banking-addons/+bug/1300862

For more details, see:
https://code.launchpad.net/~camptocamp/banking-addons/bank-statement-reconcile-7.0-fix-default-lep/+merge/213682
-- 
https://code.launchpad.net/~camptocamp/banking-addons/bank-statement-reconcile-7.0-fix-default-lep/+merge/213682
Your team Banking Addons Core Editors is requested to review the proposed merge of lp:~camptocamp/banking-addons/bank-statement-reconcile-7.0-fix-default-lep into lp:banking-addons/bank-statement-reconcile-7.0.
=== modified file 'account_statement_base_import/statement.py'
--- account_statement_base_import/statement.py	2014-03-06 09:40:57 +0000
+++ account_statement_base_import/statement.py	2014-04-01 15:56:59 +0000
@@ -110,6 +110,7 @@
         :return: dict of vals that will be passed to create method of statement line.
         """
         statement_obj = self.pool.get('account.bank.statement')
+        statement_line_obj = self.pool['account.bank.statement.line']
         values = parser_vals
         values['statement_id'] = statement_id
         values['account_id'] = statement_obj.get_account_for_counterpart(cr,
@@ -132,7 +133,7 @@
                                                            context=context)
             values['period_id'] = periods[0]
             period_memoizer[date] = periods[0]
-        values['type'] = 'general'
+        values = statement_line_obj._add_missing_default_values(cr, uid, values, context)
         return values
 
     def prepare_statement_vals(self, cr, uid, profile_id, result_row_list, parser, context):


Follow ups