[13.0][FIX] account_banking_mandate: Set Force company

account_banking_mandate 13.0.1.0.1
This commit is contained in:
Enric Tobella
2020-05-15 10:48:35 +02:00
committed by Reyes4711
parent 42c3b8e367
commit 3a3ca6dd6b
2 changed files with 2 additions and 1 deletions

View File

@@ -7,7 +7,7 @@
{
"name": "Account Banking Mandate",
"summary": "Banking mandates",
"version": "13.0.1.0.0",
"version": "13.0.1.0.1",
"license": "AGPL-3",
"author": "Compassion CH, "
"Tecnativa, "

View File

@@ -35,6 +35,7 @@ class AccountMove(models.Model):
for onchange_method, changed_fields in list(onchanges.items()):
if any(f not in vals for f in changed_fields):
invoice = self.new(vals)
invoice = invoice.with_context(force_company=invoice.company_id.id,)
getattr(invoice, onchange_method)()
for field in changed_fields:
if field not in vals and invoice[field]: