summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2019-02-18 12:39:50 +0000
committerNicolas Martinelli <nim@odoo.com>2019-02-18 12:55:35 +0000
commit3e147220fd3b410ad8b530daccff5f697e1749c6 (patch)
treed289734b57c60ace490cf2882bdf0ccbd44a2093 /addons/web/static/src/js/views/basic/basic_controller.js
parentcece8834f91837a1aec6585bd8583d916fe37120 (diff)
[FIX] account_voucher: round globally
- Enable multi-currency. Company currency = USD, another currency = SGD - Update the exchange rate - Create a purchase journal. Assign SGD to this journal - Create a purchase tax of 7.00 % - Enable tax rounding globally - Create a purchase receipt with the following values 62.04 @ 7% tax 7.29 @ 7% tax An error occurs: 'Cannot create unbalanced journal entry.' Each line of the receipt creates its own tax line, which is therefore rounded => the total of the receipt is computed with a 'round globally' configuration, while the taxes are computed with a 'round per line' configuration. This is because `apply_taxes=True` is set in the context. This creates the tax line by forcing the rounding. Therefore, we call the method `_apply_taxes` explicitly in this specific case, and manually round the taxes once they are merged. opw-1938623 closes odoo/odoo#31194
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions