From 7a1f505e31f4fd200ee3e1acd94796dbb87aaf81 Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Mon, 23 Oct 2023 14:18:25 +0200 Subject: [PATCH] [FIX] website_sale: do not request shipping address when already given * if customer said to use the same address as shipping * if customer already chose/has/gave shipping address Part-of: odoo/odoo#139474 --- addons/website_sale/controllers/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index d1c8c8652f9..def977f20e5 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -1293,9 +1293,13 @@ class WebsiteSale(payment_portal.PaymentPortal): update_values['partner_invoice_id'] = partner_id if kw.get('use_same'): update_values['partner_shipping_id'] = partner_id - elif not kw.get('callback') and not order.only_services: + elif ( + order._is_public_order() + and not kw.get('callback') + and not order.only_services + ): # Now that the billing is set, if shipping is necessary - # request the user to fill the shipping address + # request the customer to fill the shipping address kw['callback'] = '/shop/address' elif address_mode == 'shipping': update_values['partner_shipping_id'] = partner_id