[FIX] stock_account: bad argument in compute on "res.currency"

The function compute defined in "res.currency" takes records as arguents.

opw:690787
This commit is contained in:
Goffin Simon
2016-10-18 13:36:53 +02:00
parent 5ada73335a
commit 67ad7a3452
@@ -77,7 +77,7 @@ class AccountInvoiceLine(models.Model):
def _get_price(self, company_currency, price_unit):
if self.invoice_id.currency_id.id != company_currency:
price = company_currency.with_context(date=self.invoice_id.date_invoice).compute(price_unit * self.quantity, self.invoice_id.currency_id.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
return round(price, self.invoice_id.currency_id.decimal_places)