clearcorp team mailing list archive
-
clearcorp team
-
Mailing list archive
-
Message #00418
[Branch ~banking-addons-team/banking-addons/6.1] Rev 142: [FIX] Unclear error message when no period exists for bank statement date
Merge authors:
Stefan Rijnhart (Therp) (stefan-therp)
Related merge proposals:
https://code.launchpad.net/~therp-nl/banking-addons/6.1-check_statement_date_period_id/+merge/137990
proposed by: Stefan Rijnhart (Therp) (stefan-therp)
------------------------------------------------------------
revno: 142 [merge]
author: Stefan Rijnhart (Therp)
committer: Guewen Baconnier @ Camptocamp <guewen.baconnier@xxxxxxxxxxxxxx>
branch nick: banking-addons
timestamp: Wed 2012-12-05 09:32:23 +0100
message:
[FIX] Unclear error message when no period exists for bank statement date
modified:
account_banking/wizard/bank_import.py
--
lp:banking-addons
https://code.launchpad.net/~banking-addons-team/banking-addons/6.1
Your team CLEARCORP development team is subscribed to branch lp:banking-addons.
To unsubscribe from this branch go to https://code.launchpad.net/~banking-addons-team/banking-addons/6.1/+edit-subscription
=== modified file 'account_banking/wizard/bank_import.py'
--- account_banking/wizard/bank_import.py 2012-06-26 09:46:07 +0000
+++ account_banking/wizard/bank_import.py 2012-07-11 10:37:31 +0000
@@ -263,6 +263,16 @@
('date_stop','>=',statement.date),
('special', '=', False)])
+ if not period_ids:
+ results.log.append(
+ _('No period found covering statement date %(date)s, '
+ 'statement %(id)s skipped') % {
+ 'date': statement.date,
+ 'id': statement.id,
+ }
+ )
+ continue
+
# Create the bank statement record
statement_id = statement_obj.create(cursor, uid, dict(
name = statement.id,