[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) <nim@odoo.com>
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user