Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
8980 Widoki

Hello, 

I have installed the Website module and now each time I log in Odoo I am presented with this page (which i assume belongs to Webpage module) that has a top bar typically of the webpage portal.

What I wanted to ask is, is there a way to bypass this page and make users login into Odoo using Odoo's default login page (befoe the installation of Website) ?

P.S.: I have tried overwrite index of Website module, to no avail.



Awatar
Odrzuć
Najlepsza odpowiedź

Yes, you can create your own page with page controller. But when you create your controller you need to set auth="user".

Add below code in your module controller file and when you open /test/page it will re-direct to Login. Once you login you will access this page.

from odoo import http 
from odoo.http import request 

class website_test(http.Controller): 

@http.route("/test/page/", type='http', auth="user") 
def test_one(self, **kw): 
# here do whatever you want 
return request.render('web.test_page', {})

Let us know further.


Awatar
Odrzuć
Autor

Thank you for your help.

I ended up doing what you said and created a page with page controller.

Powiązane posty Odpowiedzi Widoki Czynność
2
sty 25
5584
0
sie 18
3431
1
mar 18
4761
0
lut 23
2212
3
paź 19
6018