Browse Source

[9.0][IMP] contract: Get default invoice contact. (#32)

pull/202/head
carlosdauden 9 years ago
committed by Pedro M. Baeza
parent
commit
098e80eb85
  1. 3
      contract/models/contract.py

3
contract/models/contract.py

@ -204,7 +204,8 @@ class AccountAnalyticAccount(models.Model):
invoice = self.env['account.invoice'].new({ invoice = self.env['account.invoice'].new({
'reference': contract.code, 'reference': contract.code,
'type': 'out_invoice', 'type': 'out_invoice',
'partner_id': contract.partner_id,
'partner_id': contract.partner_id.address_get(
['invoice'])['invoice'],
'currency_id': currency.id, 'currency_id': currency.id,
'journal_id': journal.id, 'journal_id': journal.id,
'date_invoice': contract.recurring_next_date, 'date_invoice': contract.recurring_next_date,

Loading…
Cancel
Save