[FIX] Account:rounding poorly applied

Rounding each element of the sum decrease the
precision and prevent to reconcile large recordset.

closes odoo/odoo#33100

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
This commit is contained in:
Nathan de Pryck
2019-05-02 08:26:25 +00:00
parent 5d6656d739
commit 0164c9dfcb
+1 -1
View File
@@ -322,7 +322,7 @@ class AccountMoveLine(models.Model):
else:
date = partial_line.credit_move_id.date if partial_line.debit_move_id == line else partial_line.debit_move_id.date
rate = line.currency_id.with_context(date=date).rate
amount_residual_currency += sign_partial_line * line.currency_id.round(partial_line.amount * rate)
amount_residual_currency += sign_partial_line * partial_line.amount * rate
#computing the `reconciled` field. As we book exchange rate difference on each partial matching,
#we can only check the amount in company currency