跳至內容
選單
此問題已被標幟
3 回覆
4321 瀏覽次數

When clients "public user's" login to our odoo site they all land at the https://domain.com/my page which is the default landing page for public user login, where can i define a specific page for this?  the only client we have login to our site are using our elearning /slides module and i want them to land at the "/slides" page to see their courses, 

頭像
捨棄
作者

I found a workaround for now, I used the website builder to edit the "/my" page and added all the links that will direct the clients to the slides section.

作者 最佳答案

Hi Dindin, I ended up using the webpage editor to edit the /my page and added a few links one of them was the My courses button.

you can see here but you have to create a login account if you want to see the changes.

Cheers
https://www.p3permaculture.ca/my

頭像
捨棄

I just logged in, it WORKED! and that's cool! :)

Anyway, what BLOCK did you use in the editor?

I tried several times (customizing the /my page) but whenever I save it, an error message appeared.

Nice to know you.

最佳答案

Hello @Graham,

One way to do so is to extend the login controller which is responsible for redirecting user to proper page on successful login.

this controller can be found in web module: /web/controllers/main.py inside Home class.

@http.route('/web/login', type='http', auth="none", sitemap=False, csrf=False)
def web_login(self, redirect=None, **kw):

you can add a condition here that after successful login if the user is a public user redirect to /your-desired-url else let the original workflow continue.

Hope this helps.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

頭像
捨棄
作者

Thank you so much for your help, I am not code savy so my workaround is what i will stay with.
Cheers

最佳答案

Hi Graham, could you please explain your steps doing that workaround?

 

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
7月 23
1569
5
11月 22
3814
0
7月 22
2469
0
3月 22
2954
0
2月 22
2340