コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4721 ビュー

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!





アバター
破棄
最善の回答

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", "");
}
});

アバター
破棄
関連投稿 返信 ビュー 活動
0
9月 23
1448
2
6月 24
5883
1
12月 22
8034
0
1月 22
3170
0
7月 21
2980