[FIX] account: missing default for company_id in _convert

This commit is contained in:
qdp-odoo
2018-04-23 13:26:53 +02:00
parent 6d4eb69ef3
commit fef949047c
+1 -1
View File
@@ -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