From dd28f9bf78c35c878eaf35622212e5a40f90fa40 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 29 Sep 2016 15:06:38 +0200 Subject: [PATCH] [FIX] website_quote: /quote/ redirects to login when not signed in and no token When the route /quote/ is accessed without token e.g. through the `View sales Order` button in the headers of thread mails the user must be redirected to the login screen if he's not signed in. In other words, you must be signed in to access this route without token. opw-687931 --- addons/website_quote/controllers/main.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/website_quote/controllers/main.py b/addons/website_quote/controllers/main.py index a5e7b6c85ac..49e9628bf77 100644 --- a/addons/website_quote/controllers/main.py +++ b/addons/website_quote/controllers/main.py @@ -13,10 +13,11 @@ from openerp.addons.website_mail.controllers.main import _message_post_helper class sale_quote(http.Controller): - @http.route([ - "/quote/", - "/quote//" - ], type='http', auth="public", website=True) + @http.route("/quote/", type='http', auth="user", website=True) + def view_user(self, *args, **kwargs): + return self.view(*args, **kwargs) + + @http.route("/quote//", type='http', auth="public", website=True) def view(self, order_id, pdf=None, token=None, message=False, **post): # use SUPERUSER_ID allow to access/view order for public user # only if he knows the private token