[FIX] account: account_invoice's onchange_partner_id uses the first partner bank account if several are defined. Merge of #2280

This commit is contained in:
Arthur Maniet 2014-09-16 13:36:36 +02:00 committed by qdp-odoo
parent d6741c8b54
commit 9f481d6c64
1 changed files with 1 additions and 1 deletions

View File

@ -449,7 +449,7 @@ class account_invoice(models.Model):
account_id = pay_account.id
payment_term_id = p.property_supplier_payment_term.id
fiscal_position = p.property_account_position.id
bank_id = p.bank_ids.id
bank_id = p.bank_ids and p.bank_ids[0].id or False
result = {'value': {
'account_id': account_id,