[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:
@@ -739,7 +739,7 @@ class account_invoice(models.Model):
|
||||
if self.currency_id != company_currency:
|
||||
currency = self.currency_id.with_context(date=self.date_invoice or fields.Date.context_today(self))
|
||||
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)
|
||||
else:
|
||||
line['currency_id'] = False
|
||||
|
||||
Reference in New Issue
Block a user