Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
4633 Weergaven

Hi Odoo Community,

I'm new to Odoo and I strictly work with the web hosted edition of Odoo through the standard Odoo interfaces and custom HTML/CSS/JS.

I'd like to redirect a portal user after a successful login to a website page that I published from the Website Builder and made only available to logged in users.

How can I change the default redirect set by Odoo as (/my) to another page?

Thanks!





Avatar
Annuleer
Beste antwoord

Hello 

your problem based on _login_redirect( function you must override it. 

but as you said you need simple solution you can add this JS code to redirect and one register to other url 



odoo.define('website.user_custom_code', function (require) {
'use strict';

$(".oe_signup_form button").click(function() {
localStorage.setItem("from", "signup");
});
if(localStorage.getItem("from") == "signup" && window.location.href == "{YOUR ODOO URL }")
{
 
$(location).prop('href', 'http://stackoverflow.com') // add your url here
localStorage.setItem("from", "");
}
});

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
sep. 23
1416
2
jun. 24
5763
1
dec. 22
7974
0
jan. 22
3152
0
jul. 21
2970