From b6a426247f5cdf1d38bd9719dbca76276756c682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Sat, 3 Aug 2013 12:29:55 +0200 Subject: [PATCH] [FIX] handle situation where transfer account is not defined on payment order mode --- account_banking_payment/model/account_payment.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/account_banking_payment/model/account_payment.py b/account_banking_payment/model/account_payment.py index b238cbeef..2e21a6952 100644 --- a/account_banking_payment/model/account_payment.py +++ b/account_banking_payment/model/account_payment.py @@ -284,6 +284,8 @@ class payment_order(orm.Model): 'debit': _('Direct debit order'), } for order in self.browse(cr, uid, ids, context=context): + if not order.mode.transfer_journal_id or not order.mode.transfer_account_id: + continue for line in order.line_ids: # basic checks if not line.move_line_id: