[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) <yti@odoo.com>
This commit is contained in:
Prakash Prajapati
2019-12-23 12:17:11 +00:00
parent b7856d6ea7
commit 0bd38574d2
+1 -1
View File
@@ -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