credativ team mailing list archive
-
credativ team
-
Mailing list archive
-
Message #00062
[Merge] lp:~credativ/account-banking/fix-variable-error-6.0 into lp:~therp-nl/account-banking/upgrade-6.0
Dmitrijs Ledkovs (credativ) has proposed merging lp:~credativ/account-banking/fix-variable-error-6.0 into lp:~therp-nl/account-banking/upgrade-6.0.
Requested reviews:
Therp (therp-nl)
For more details, see:
https://code.launchpad.net/~credativ/account-banking/fix-variable-error-6.0/+merge/80914
[FIX] UnboundLocalError: local variable 'payment_lines' referenced before assignment
When trying to import first statement and no other statements are present.
--
https://code.launchpad.net/~credativ/account-banking/fix-variable-error-6.0/+merge/80914
Your team Credativ is subscribed to branch lp:~credativ/account-banking/fix-variable-error-6.0.
=== modified file 'account_banking/wizard/bank_import.py'
--- account_banking/wizard/bank_import.py 2011-08-19 13:16:41 +0000
+++ account_banking/wizard/bank_import.py 2011-11-01 15:04:25 +0000
@@ -533,6 +533,7 @@
imported_statement_ids = []
linked_payments = {}
linked_invoices = {}
+ payment_lines = []
if statements:
# Get default defaults
@@ -571,8 +572,6 @@
payment_line_ids = [x[0] for x in cursor.fetchall()]
if payment_line_ids:
payment_lines = payment_line_obj.browse(cursor, uid, payment_line_ids)
- else:
- payment_lines = []
for statement in statements:
if statement.local_account in error_accounts:
Follow ups