[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
This commit is contained in:
Victor Feyens
2023-06-22 15:40:51 +02:00
parent f5f54899a9
commit d2eb6b7143
+1 -1
View File
@@ -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