summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2019-04-25 07:32:09 +0000
committerRomain Derie <rde@odoo.com>2019-05-06 14:51:43 +0000
commitfb5015d5fceacb4da7f3a0527a61f28867656e0c (patch)
treef5ee965f74c3dabe810662ee798c823e7ef114bc /addons/web/static/src/js/views/basic/basic_controller.js
parentd47f0ddbe47e065144f5dfc8b13691394366250d (diff)
[FIX] website_sale_delivery: show correct fixed price
There was 2 issues regarding delivery price when the delivery was set to fixed price and free over a certain amount. 1. On /shop/payment step, such deliveries would have the fixed price shown on the badge, even if the sale order amount exceed the free over threshold. 2. When clicking on a delivery carrier, it is supposed to compute all the SO costs (delivery, taxes..) and display them. The delivery price selector would try to get the 'badge.hidden' element which never exists for fixed prices. Thus, it would not update the delivery badge price. Now: 1. If the free over threshold is met, we display 0$ instead of the fixed price by calling `rate_shipment`. Note that `rate_shipment` can't fail in case of a fixed rate (see method). The only failing case is if the customer country does not match the delivery allowed country, but such a flow is not possible as delivery shown during cart payment are already filtered by allowed countries. 2. The delivery value returned after clicking on the carrier is correctly updated on the badge. Fixes #31502 closes odoo/odoo#32938 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions