I'm working on a local odoo 8.
I have a website shop that it is not available for public. By the business policies the customer have to sign a contract and then the administrator provide user and password for the customer to be able to shop in our website.
Using a security rule I'm hiding the shop tab for a public users and it is available back just for registered users.
When a customer log in successfully the system automatically redirect them to the portal. I would like to know if there is a way to modify this in order to redirect our customers to the shop automatically after the log in.
You can also update the view "web.login" ...
<input type="hidden" name="redirect" t-att-value="redirect"/>
<input type="hidden" name="redirect" t-att-value="redirect + '&redirect=/shop' "/>
<input type="hidden" name="redirect" t-att-value="'%s%s' % (redirect or '', (redirect and '&' or '?' ) + 'redirect=/shop' )"/>
Keeping the first redirect is not useless ! ...
/web/login and /web allow redirect as param.
So if a real redirect: (session expired eg)
/web?#model=res.partner&active_id=1&redirect=/shop --> no redirect (#)
/web?redirect=/shop --> redirected to /shop
This works great for web.login but doesn't work for auth_signup.reset_password. What is the syntax or method to change the redirect when someone confirms their account via creating a password?
When you invite someone and they confirm their account, they are sent to the auth_signup.reset_password page to create a password. Then they are redirected to the portal instead of any website page.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 3/5/15, 7:41 PM|
|Seen: 3392 times|
|Last updated: 10/25/15, 11:40 PM|