diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2019-03-12 09:46:51 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2019-03-12 09:56:19 +0000 |
| commit | 77584bee3c743fd59d7b5174e8f6b0c74b64db12 (patch) | |
| tree | 63bc38c6cc0d661cc79777641d1852bdc8f81115 /addons/web/static/src/js/views/basic | |
| parent | 602a485f521db2aa83b73f441927ef9221cb8a6a (diff) | |
[FIX] website_sale: price precision
- Set company currency as VND and Enable the Multi-currency with USD
- Create Pricelists for VND & USD, set them as 'Selectable'
- Without being logged, go to eCommerce
- Select the USD pricelist
- Open a product page
The price has zero decimals, while it should have 2.
When the product page is opened, a RPC call is performed on
`get_combination_info_website`:
https://github.com/odoo/odoo/blob/7612f2c55cd4795b109a3b3dc3099f280ce99a7f/addons/sale/static/src/js/product_configurator_mixin.js#L71
When the response is received, the price is updated in:
https://github.com/odoo/odoo/blob/7612f2c55cd4795b109a3b3dc3099f280ce99a7f/addons/sale/static/src/js/product_configurator_mixin.js#L472
However, `_priceToStr` uses the decimal precision of
`product.currency_id.decimal_places`:
https://github.com/odoo/odoo/blob/7612f2c55cd4795b109a3b3dc3099f280ce99a7f/addons/sale/static/src/js/product_configurator_mixin.js#L543
This is incorrect: it should be the currency of the website, not the
curency of the product.
opw-1947140
closes odoo/odoo#31770
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic')
0 files changed, 0 insertions, 0 deletions
