From e34d710a64e2f681101faac63ce646baf268eddc Mon Sep 17 00:00:00 2001 From: "Nasreddin (bon)" Date: Fri, 15 Jan 2021 17:21:00 +0000 Subject: [PATCH] [FIX] website_sale_delivery: Compute summary total amount on delivery update Issue - Connect on smartphone (or use chrome debug mode to switch to mobile view) - Install "Ecommerce" module - Add a delivery method D with a price on product P and publish it - Go to shop and add product P to your cart - Go to payment and switch delivery method Total amount above the summary is not updated. Cause Update is done on JS when delivery method is changed. No targeting Total Amount in summary head card (seen only on small device). Solution Add ID on Total Amount in summary head card element and update it with JS in same time as other fields (taxes, total, ...). opw-2424355 closes odoo/odoo#64808 X-original-commit: 7ab63d323680a6a69e77dcc59819928aa7872582 Signed-off-by: bon-odoo --- addons/website_sale/views/templates.xml | 2 +- .../static/src/js/website_sale_delivery.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml index 17ab252640c..e6f3a32294d 100644 --- a/addons/website_sale/views/templates.xml +++ b/addons/website_sale/views/templates.xml @@ -1580,7 +1580,7 @@
- Your order: + Your order:
diff --git a/addons/website_sale_delivery/static/src/js/website_sale_delivery.js b/addons/website_sale_delivery/static/src/js/website_sale_delivery.js index 07bcdb5e9d6..e01874382dd 100644 --- a/addons/website_sale_delivery/static/src/js/website_sale_delivery.js +++ b/addons/website_sale_delivery/static/src/js/website_sale_delivery.js @@ -70,7 +70,7 @@ publicWidget.registry.websiteSaleDelivery = publicWidget.Widget.extend({ var $amountDelivery = $('#order_delivery .monetary_field'); var $amountUntaxed = $('#order_total_untaxed .monetary_field'); var $amountTax = $('#order_total_taxes .monetary_field'); - var $amountTotal = $('#order_total .monetary_field'); + var $amountTotal = $('#order_total .monetary_field, #amount_total_summary.monetary_field'); if (result.status === true) { $amountDelivery.html(result.new_amount_delivery);