summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2018-08-09 11:07:03 +0200
committerGoffin Simon <sig@odoo.com>2018-08-09 13:43:38 +0200
commita10ea93dbe5bbfcdc53f7ba46fd2b52ef6862a8f (patch)
tree519e137fe25a3907493e1028dc7c0e13512caa07
parent908ddbfeb75a38c29a85c02573d1cef3413754e2 (diff)
[FIX] account: rounding problem with Payment Matching in multi-currency
Steps to reproduce: - activate the multi-currency option in the Accounting App - activate the EUR currency (USD being the base currency) - create a EUR Bank Journal with an EUR account - on 31/07 ==> rate = 1.1 - on 08/08 ==> rate = 1.2 - create a vendor bill for Asustek on 31/07 for 39794,40 EUR - create a vendor bill for Asustek on 31/07 for 61668,00 EUR - create a vendor bill for Asustek on 31/07 for 33487,70 EUR - create a supplier payment for Asustek for 134950,1 EUR - use the payment matching smart button - match the 3 invoices you entered; Bug: Odoo says there is an open balance to write-off and prevents you from reconciling Expected Behavior: the payment total amount in EUR matches the 3 vendor bills total amount in EUR so I would expect Odoo to consider I have a perfect match between the payment and the vendor bills and the difference in USD (base currency) should be automatically reflected through an exchange difference entry. if you follow the same operation with 3 invoices of 115EUR each and a payment of 345EUR, it will work as expected. opw:1872978
-rw-r--r--addons/account/static/src/js/reconciliation/reconciliation_model.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/account/static/src/js/reconciliation/reconciliation_model.js b/addons/account/static/src/js/reconciliation/reconciliation_model.js
index f76304e6908..c6e0bedb8ee 100644
--- a/addons/account/static/src/js/reconciliation/reconciliation_model.js
+++ b/addons/account/static/src/js/reconciliation/reconciliation_model.js
@@ -855,6 +855,7 @@ var StatementModel = BasicModel.extend({
}
});
total = Math.round(total*1000)/1000 || 0;
+ amount_currency = Math.round(amount_currency);
line.balance = {
amount: total,
amount_str: field_utils.format.monetary(Math.abs(total), {}, formatOptions),