Browse Source

[FIX] contract_payment_mode: get bank account from partner

in recurring invoice
pull/28/head
javialgios 9 years ago
parent
commit
9a15542958
  1. 5
      contract_payment_mode/models/contract.py

5
contract_payment_mode/models/contract.py

@ -27,6 +27,9 @@ class AccountAnalyticAccount(models.Model):
if contract.payment_mode_id: if contract.payment_mode_id:
invoice_vals['payment_mode_id'] = contract.payment_mode_id.id invoice_vals['payment_mode_id'] = contract.payment_mode_id.id
invoice_vals['partner_bank_id'] = \ invoice_vals['partner_bank_id'] = \
contract.payment_mode_id.bank_id.id
invoice_vals['partner_bank_id'] = (
contract.partner_id.bank_ids and
contract.partner_id.bank_ids[0].id or
contract.payment_mode_id.bank_id.id)
return invoice_vals return invoice_vals
Loading…
Cancel
Save