From fef949047c33a2d2a4446e225a7f58be2c6441e1 Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Mon, 23 Apr 2018 11:57:50 +0200 Subject: [PATCH] [FIX] account: missing default for company_id in _convert --- addons/account/models/account_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index 52c7f346734..7e6f9bdf20e 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -1448,7 +1448,7 @@ class AccountInvoiceLine(models.Model): if self.invoice_id.currency_id and self.invoice_id.currency_id != self.invoice_id.company_id.currency_id: currency = self.invoice_id.currency_id date = self.invoice_id._get_currency_rate_date() - price_subtotal_signed = currency._convert(price_subtotal_signed, self.invoice_id.company_id.currency_id, self.company_id, date or fields.Date.today()) + price_subtotal_signed = currency._convert(price_subtotal_signed, self.invoice_id.company_id.currency_id, self.company_id or self.env.user.company_id, date or fields.Date.today()) sign = self.invoice_id.type in ['in_refund', 'out_refund'] and -1 or 1 self.price_subtotal_signed = price_subtotal_signed * sign