Suggested by Stefan Rijnhart : check for the payment_mode_id before asking its bank_id.id

This commit is contained in:
Alexis de Lattre
2014-06-23 11:45:26 +02:00
committed by Enric Tobella
parent d7861c439d
commit f610f5b592

View File

@@ -48,6 +48,7 @@ class account_invoice(orm.Model):
'payment_mode_id':
partner.customer_payment_mode.id or False,
'partner_bank_id':
partner.customer_payment_mode and
partner.customer_payment_mode.bank_id.id or False,
})
else: