[FIX] account: invoice lines amounts must be rounded when converted to journal items
This revision is related to cfbd086b09
.
This is the same use case than above, but with a different
currency than the one of the company, for the field
`amount_currency` this time.
Closes #8135
opw-647639
This commit is contained in:
parent
9a9720ac14
commit
802d1abe7a
|
@ -739,7 +739,7 @@ class account_invoice(models.Model):
|
||||||
if self.currency_id != company_currency:
|
if self.currency_id != company_currency:
|
||||||
currency = self.currency_id.with_context(date=self.date_invoice or fields.Date.context_today(self))
|
currency = self.currency_id.with_context(date=self.date_invoice or fields.Date.context_today(self))
|
||||||
line['currency_id'] = currency.id
|
line['currency_id'] = currency.id
|
||||||
line['amount_currency'] = line['price']
|
line['amount_currency'] = currency.round(line['price'])
|
||||||
line['price'] = currency.compute(line['price'], company_currency)
|
line['price'] = currency.compute(line['price'], company_currency)
|
||||||
else:
|
else:
|
||||||
line['currency_id'] = False
|
line['currency_id'] = False
|
||||||
|
|
Loading…
Reference in New Issue