mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
Suggested by Stefan Rijnhart : check for the payment_mode_id before asking its bank_id.id
This commit is contained in:
committed by
Artem Kostyuk
parent
1f21a3739d
commit
ac5fdc02c5
@@ -49,6 +49,7 @@ class sale_order(orm.Model):
|
||||
cr, uid, order, lines, context=context)
|
||||
invoice_vals.update({
|
||||
'payment_mode_id': order.payment_mode_id.id or False,
|
||||
'partner_bank_id': order.payment_mode_id.bank_id.id or False,
|
||||
'partner_bank_id': order.payment_mode_id and
|
||||
order.payment_mode_id.bank_id.id or False,
|
||||
})
|
||||
return invoice_vals
|
||||
|
||||
Reference in New Issue
Block a user