summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqdp-odoo <qdp@odoo.com>2018-04-23 11:57:50 +0200
committerqdp-odoo <qdp@odoo.com>2018-04-23 13:26:53 +0200
commitfef949047c33a2d2a4446e225a7f58be2c6441e1 (patch)
tree718eb732f3169da02e55ec3021ffa6ca50ba3343
parent6d4eb69ef3ddefe4698a338eee7ac946446f6b86 (diff)
[FIX] account: missing default for company_id in _convert
-rw-r--r--addons/account/models/account_invoice.py2
1 files changed, 1 insertions, 1 deletions
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