From 340d70338fb5796c1b290fd72cdf3755c3fcc49d Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 23 Jan 2018 10:39:52 +0100 Subject: [PATCH] [FIX] website_sale_delivery: round delivery price `delivery_price` is a float, therefore we round it to the currency since a carrier could send more than the expected number of decimals. opw-804374 --- 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 0e86dba0307..36ee8bd651f 100644 --- a/addons/website_sale_delivery/controllers/main.py +++ b/addons/website_sale_delivery/controllers/main.py @@ -65,7 +65,7 @@ class WebsiteSaleDelivery(WebsiteSale): return {'status': order.delivery_rating_success, 'error_message': order.delivery_message, 'carrier_id': carrier_id, - 'new_amount_delivery': order.delivery_price, + 'new_amount_delivery': order.currency_id.round(order.delivery_price), 'new_amount_untaxed': order.amount_untaxed, 'new_amount_tax': order.amount_tax, 'new_amount_total': order.amount_total,