Browse Source

contract_payment_mode: get bank account from partner (#30)

in recurring invoice
pull/164/head
Javi Melendez 9 years ago
committed by cubells
parent
commit
40cc4a021e
  1. 5
      contract_payment_mode/models/contract.py

5
contract_payment_mode/models/contract.py

@ -26,7 +26,8 @@ class AccountAnalyticAccount(models.Model):
_prepare_invoice_data(contract)
if contract.payment_mode_id:
invoice_vals['payment_mode_id'] = contract.payment_mode_id.id
invoice_vals['partner_bank_id'] = \
contract.payment_mode_id.bank_id.id
invoice_vals['partner_bank_id'] = (
contract.partner_id.bank_ids[:1].id or
contract.payment_mode_id.bank_id.id)
return invoice_vals
Loading…
Cancel
Save