← Back to team overview

banking-addons-team team mailing list archive

[Merge] lp:~camptocamp/banking-addons/bank-statement-reconcile-7.0-get_st_vals-1285086 into lp:banking-addons/bank-statement-reconcile-7.0

 

Guewen Baconnier @ Camptocamp has proposed merging lp:~camptocamp/banking-addons/bank-statement-reconcile-7.0-get_st_vals-1285086 into lp:banking-addons/bank-statement-reconcile-7.0.

Requested reviews:
  Banking Addons Core Editors (banking-addons-team)
Related bugs:
  Bug #1285086 in Banking Addons: "bank-statement-reconcile: import of bank statement fails: date and name required"
  https://bugs.launchpad.net/banking-addons/+bug/1285086

For more details, see:
https://code.launchpad.net/~camptocamp/banking-addons/bank-statement-reconcile-7.0-get_st_vals-1285086/+merge/208330

Fix a regression, the name and date fields had default values until recently. 

Details in bug report lp:1285086
-- 
https://code.launchpad.net/~camptocamp/banking-addons/bank-statement-reconcile-7.0-get_st_vals-1285086/+merge/208330
Your team Banking Addons Core Editors is requested to review the proposed merge of lp:~camptocamp/banking-addons/bank-statement-reconcile-7.0-get_st_vals-1285086 into lp:banking-addons/bank-statement-reconcile-7.0.
=== modified file 'account_statement_base_import/parser/parser.py'
--- account_statement_base_import/parser/parser.py	2014-01-21 16:46:36 +0000
+++ account_statement_base_import/parser/parser.py	2014-02-26 11:04:34 +0000
@@ -20,6 +20,7 @@
 ##############################################################################
 import base64
 import csv
+from datetime import datetime
 
 
 def UnicodeDictReader(utf8_data, **kwargs):
@@ -121,10 +122,10 @@
         :return: dict of vals that represent additional infos for the statement
         """
         return {
-                'name': self.statement_name,
+                'name': self.statement_name or '/',
                 'balance_start': self.balance_start,
                 'balance_end_real': self.balance_end,
-                'date': self.statement_date
+                'date': self.statement_date or datetime.now()
         }
 
     def get_st_line_vals(self, line, *args, **kwargs):


Follow ups