[FIX] stock_account: stop comparing apples and oranges

company_currency is a recordset, not an id
Introduced at 19199457

Closes #13707
This commit is contained in:
Martin Trigaux
2016-10-20 09:55:31 +02:00
parent 326ef2301e
commit 26bbfc46f6
@@ -76,7 +76,7 @@ class AccountInvoiceLine(models.Model):
return self.product_id.standard_price
def _get_price(self, company_currency, price_unit):
if self.invoice_id.currency_id.id != company_currency:
if self.invoice_id.currency_id.id != company_currency.id:
price = company_currency.with_context(date=self.invoice_id.date_invoice).compute(price_unit * self.quantity, self.invoice_id.currency_id)
else:
price = price_unit * self.quantity