← Back to team overview

banking-addons-team team mailing list archive

lp:~therp-nl/banking-addons/6.1-lp1017470-period_search_ignore_special into lp:banking-addons

 

Stefan Rijnhart (Therp) has proposed merging lp:~therp-nl/banking-addons/6.1-lp1017470-period_search_ignore_special into lp:banking-addons.

Requested reviews:
  Banking Addons Team (banking-addons-team)
Related bugs:
  Bug #1017470 in Banking Addons: "nl_abnamro skips 1-1-2012 record"
  https://bugs.launchpad.net/banking-addons/+bug/1017470

For more details, see:
https://code.launchpad.net/~therp-nl/banking-addons/6.1-lp1017470-period_search_ignore_special/+merge/112063
-- 
https://code.launchpad.net/~therp-nl/banking-addons/6.1-lp1017470-period_search_ignore_special/+merge/112063
Your team Banking Addons Team is requested to review the proposed merge of lp:~therp-nl/banking-addons/6.1-lp1017470-period_search_ignore_special into lp:banking-addons.
=== modified file 'account_banking/wizard/bank_import.py'
--- account_banking/wizard/bank_import.py	2012-05-02 15:09:49 +0000
+++ account_banking/wizard/bank_import.py	2012-06-26 10:54:24 +0000
@@ -260,7 +260,8 @@
             # Get the period for the statement (as bank statement object checks this)
             period_ids = period_obj.search(cursor, uid, [('company_id','=',company.id),
                                                          ('date_start','<=',statement.date),
-                                                         ('date_stop','>=',statement.date)])
+                                                         ('date_stop','>=',statement.date),
+                                                         ('special', '=', False)])
 
             # Create the bank statement record
             statement_id = statement_obj.create(cursor, uid, dict(

=== modified file 'account_banking/wizard/banktools.py'
--- account_banking/wizard/banktools.py	2012-04-14 08:58:58 +0000
+++ account_banking/wizard/banktools.py	2012-06-26 10:54:24 +0000
@@ -69,9 +69,12 @@
         return False
 
     fiscalyear_id = fiscalyear_ids[0]
+    import pdb
+    pdb.set_trace()
     period_ids = period_obj.search(cursor, uid, [
         ('date_start','<=',search_date), ('date_stop','>=',search_date),
-        ('fiscalyear_id','=',fiscalyear_id), ('state','=','draft')
+        ('fiscalyear_id','=',fiscalyear_id), ('state','=','draft'),
+        ('special', '=', False),
     ])
     if not period_ids:
         log.append(_('No suitable period found for date %(date)s and company %(company_name)s')


Follow ups