From 89683994ac4a9becc982fc3e37c8b9644a3c1362 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 15 May 2019 11:54:27 +0000 Subject: [PATCH] [FIX] website_sale_delivery: delivery amount - Go to the website settings and activate the option 'Tax-Included' for the pricing in the website. - Go to Sales > Configuration > Delivery methods and create a new method based on rules. For example: Price is 10.0 when the weight <= 100 Attach a product (with taxes) to it. - Publish on website - Buy a product on the eCommerce - Checkout, go up to payment step and choose the delivery method created The 'Delivery:' field on the left shows the delivery price with taxes excluded although they are included. Funny thing: going back to the 'Address' step show the correct price. This is because the `delivery_price` field does not take into account the tax configuration. We can use the `amount_delivery` field (hum hum) which does it correctly. opw-1981808 closes odoo/odoo#33394 Signed-off-by: Nicolas Martinelli (nim) --- addons/website_sale_delivery/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_sale_delivery/controllers/main.py b/addons/website_sale_delivery/controllers/main.py index 28c36ff6d51..05b37c6c4cf 100644 --- a/addons/website_sale_delivery/controllers/main.py +++ b/addons/website_sale_delivery/controllers/main.py @@ -69,7 +69,7 @@ class WebsiteSaleDelivery(WebsiteSale): return {'status': order.delivery_rating_success, 'error_message': order.delivery_message, 'carrier_id': carrier_id, - 'new_amount_delivery': self._format_amount(order.delivery_price, currency), + 'new_amount_delivery': self._format_amount(order.amount_delivery, currency), 'new_amount_untaxed': self._format_amount(order.amount_untaxed, currency), 'new_amount_tax': self._format_amount(order.amount_tax, currency), 'new_amount_total': self._format_amount(order.amount_total, currency),