From d2eb6b7143ce5972ce69204e003acba08ffed105 Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Thu, 30 Mar 2023 15:36:51 +0000 Subject: [PATCH] [FIX] website_sale: confirm SO as superuser * Make sure the logs are coherent (all done as Odoobot) * Correctly apply auto-lock setting on e-commerce orders Part-of: odoo/odoo#115871 --- addons/website_sale/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 5730fa3eb4e..bf3b8fe3a8b 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -1573,7 +1573,7 @@ class WebsiteSale(http.Controller): return request.redirect('/shop') if order and not order.amount_total and not tx_sudo: - order.with_context(send_email=True).action_confirm() + order.with_context(send_email=True).with_user(SUPERUSER_ID).action_confirm() return request.redirect(order.get_portal_url()) # clean context and session, then redirect to the confirmation page