From 241996d7f30a4e5067a87ec215243794a246353a Mon Sep 17 00:00:00 2001 From: carlosdauden Date: Thu, 12 May 2016 09:38:36 +0200 Subject: [PATCH] [9.0][IMP] contract: Get default invoice contact. (#32) --- contract/models/contract.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contract/models/contract.py b/contract/models/contract.py index 618bf8e5..4a15d27a 100644 --- a/contract/models/contract.py +++ b/contract/models/contract.py @@ -204,7 +204,8 @@ class AccountAnalyticAccount(models.Model): invoice = self.env['account.invoice'].new({ 'reference': contract.code, 'type': 'out_invoice', - 'partner_id': contract.partner_id, + 'partner_id': contract.partner_id.address_get( + ['invoice'])['invoice'], 'currency_id': currency.id, 'journal_id': journal.id, 'date_invoice': contract.recurring_next_date,