Skip to content

Commit

Permalink
[FIX] account: No bank account on invoice when invoicing a contact
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and Stefan Rijnhart committed Jul 2, 2014
1 parent 7d5425d commit 42d2f28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/account/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,8 @@ def onchange_partner_id(self, cr, uid, ids, type, partner_id,\
acc_id = p.property_account_payable.id
partner_payment_term = p.property_supplier_payment_term and p.property_supplier_payment_term.id or False
fiscal_position = p.property_account_position and p.property_account_position.id or False
if p.bank_ids:
bank_id = p.bank_ids[0].id
if p.commercial_partner_id.bank_ids:
bank_id = p.commercial_partner_id.bank_ids[0].id

result = {'value': {
'account_id': acc_id,
Expand Down

0 comments on commit 42d2f28

Please sign in to comment.