Stefan Rijnhart (Therp) has proposed merging 
lp:~therp-nl/banking-addons/ba70-fix_payment_detection into 
lp:banking-addons/banking-addons-70 with 
lp:~therp-nl/banking-addons/7.0-link_partner_wizard as a prerequisite.

Requested reviews:
  Banking Addons Team (banking-addons-team)

For more details, see:
https://code.launchpad.net/~therp-nl/banking-addons/ba70-fix_payment_detection/+merge/162358

As payment functionality has been split off to account_banking_payment now, 
account_banking only interacts with the payment model very minimally. There was 
already a check to see if account_payment was installed but it assumed that 
account_banking_payment is then also installed as this is now an autoinstalled 
glue module depending on the two other modules. Of course, it can easily be the 
case that this module is not in the addons path so that we need to check if 
this module itself is actually installed. This branch fixes this by checking 
for a column that account_banking_payment adds to the model.

-- 
https://code.launchpad.net/~therp-nl/banking-addons/ba70-fix_payment_detection/+merge/162358
Your team Banking Addons Team is requested to review the proposed merge of 
lp:~therp-nl/banking-addons/ba70-fix_payment_detection into 
lp:banking-addons/banking-addons-70.
=== modified file 'account_banking/banking_import_transaction.py'
--- account_banking/banking_import_transaction.py	2013-05-03 13:56:25 +0000
+++ account_banking/banking_import_transaction.py	2013-05-03 13:56:26 +0000
@@ -820,7 +820,8 @@
         journal_obj = self.pool.get('account.journal')
         move_line_obj = self.pool.get('account.move.line')
         payment_line_obj = self.pool.get('payment.line')
-        has_payment = bool(payment_line_obj)
+        has_payment = bool(
+            payment_line_obj and 'date_done' in payment_line_obj._columns)
         statement_line_obj = self.pool.get('account.bank.statement.line')
         statement_obj = self.pool.get('account.bank.statement')
         imported_statement_ids = []
@@ -856,8 +857,6 @@
                 ('date_done', '=', False)], context=context)
             payment_lines = payment_line_obj.browse(
                 cr, uid, payment_line_ids)
-        else:
-            payment_lines = False
 
         # Start the loop over the transactions requested to match
         transactions = self.browse(cr, uid, ids, context)

-- 
Mailing list: https://launchpad.net/~banking-addons-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~banking-addons-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to