From 0bd38574d2298b414aa136393ef1d7fad0fe79c9 Mon Sep 17 00:00:00 2001 From: Prakash Prajapati Date: Tue, 26 Nov 2019 11:01:55 +0000 Subject: [PATCH] [FIX] website_sale: fix traceback for website 404 Purpose of the commit is, the template website.404 is renamed in commit https://github.com/odoo/odoo/commit/423402f1e50000186924186beba0cbe87e02e774 but still remains use of it at some places which is going to produce the traceback so replace the template website.404 rendering with NotFound exception as it will use the template http_routing.404 Task-2145659 closes odoo/odoo#42294 Closes: #40924 X-original-commit: e5af7617e02e39b8a37a02b102d3da0e4525ffa9 Related: odoo/enterprise#7394 Signed-off-by: Yannick Tivisse (yti) --- 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 79664e37c6c..457d67386d3 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -386,7 +386,7 @@ class WebsiteSale(http.Controller): if access_token: abandoned_order = request.env['sale.order'].sudo().search([('access_token', '=', access_token)], limit=1) if not abandoned_order: # wrong token (or SO has been deleted) - return request.render('website.404') + raise NotFound() if abandoned_order.state != 'draft': # abandoned cart already finished values.update({'abandoned_proceed': True}) elif revive == 'squash' or (revive == 'merge' and not request.session.get('sale_order_id')): # restore old cart or merge with unexistant