diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 9b79f5e2938..d11e2019ccc 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -1722,10 +1722,9 @@ class WebsiteSale(payment_portal.PaymentPortal): :return: A list of errors (error_title, error_message) :rtype: list[tuple] """ - has_storable_products = any(line.product_id.type in ['consu', 'product'] for line in order.order_line) errors = [] - if not order._get_delivery_methods() and has_storable_products: + if not order.only_services and not order._get_delivery_methods(): errors.append(( _('Sorry, we are unable to ship your order'), _('No shipping method is available for your current order and shipping address. ' @@ -1746,7 +1745,7 @@ class WebsiteSale(payment_portal.PaymentPortal): """ order = request.website.sale_get_order() - if order and (request.httprequest.method == 'POST' or not order.carrier_id): + if order and not order.only_services and (request.httprequest.method == 'POST' or not order.carrier_id): # Update order's carrier_id (will be the one of the partner if not defined) # If a carrier_id is (re)defined, redirect to "/shop/payment" (GET method to avoid infinite loop) carrier_id = post.get('carrier_id')