mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
Set company_id earlier in the invoice preparation process so that _onchange_partner can execute as intended.
This commit is contained in:
committed by
Francisco Ivan Anton Prieto
parent
f9167d81e8
commit
05fe36d3ae
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Recurring - Contracts Management',
|
'name': 'Recurring - Contracts Management',
|
||||||
'version': '12.0.6.0.1',
|
'version': '12.0.6.0.2',
|
||||||
'category': 'Contract Management',
|
'category': 'Contract Management',
|
||||||
'license': 'AGPL-3',
|
'license': 'AGPL-3',
|
||||||
'author': "OpenERP SA, "
|
'author': "OpenERP SA, "
|
||||||
|
|||||||
@@ -309,6 +309,7 @@ class ContractContract(models.Model):
|
|||||||
vinvoice = self.env['account.invoice'].with_context(
|
vinvoice = self.env['account.invoice'].with_context(
|
||||||
force_company=self.company_id.id,
|
force_company=self.company_id.id,
|
||||||
).new({
|
).new({
|
||||||
|
'company_id': self.company_id.id,
|
||||||
'partner_id': self.invoice_partner_id.id,
|
'partner_id': self.invoice_partner_id.id,
|
||||||
'type': invoice_type,
|
'type': invoice_type,
|
||||||
})
|
})
|
||||||
@@ -320,7 +321,6 @@ class ContractContract(models.Model):
|
|||||||
'date_invoice': date_invoice,
|
'date_invoice': date_invoice,
|
||||||
'journal_id': journal.id,
|
'journal_id': journal.id,
|
||||||
'origin': self.name,
|
'origin': self.name,
|
||||||
'company_id': self.company_id.id,
|
|
||||||
'user_id': self.user_id.id,
|
'user_id': self.user_id.id,
|
||||||
})
|
})
|
||||||
if self.payment_term_id:
|
if self.payment_term_id:
|
||||||
|
|||||||
Reference in New Issue
Block a user