[FIX] handle situation where transfer account is not defined on payment order mode

This commit is contained in:
Stéphane Bidoul
2013-08-03 12:29:55 +02:00
parent 5e4779a64a
commit b6a426247f

View File

@@ -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: