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
6364 Widoki

Hi,

Anyone has idea how to replace home page in v11?

Rgds,

Anil


Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

You can try something like this,

from odoo import http
from odoo.addons.website.controllers.main import Website

class Website(Website):

@http.route(auth='public')
def index(self, data={}, **kw):
super(Website, self).index(**kw)
return http.request.render('<template_external_id>', data)


Thanks

Awatar
Odrzuć
Autor

Thanks, This is the exact answer for replacing home page. Could be possible to override with page template id? I want to append the base template, the route will pass some information in the response dictionary. like we have template ID as homepage in v10, what is the template ID for homepage in v11?

Powiązane posty Odpowiedzi Widoki Czynność
2
lip 22
9177
0
lis 24
2916
0
cze 21
2478
1
cze 21
2455
2
lut 21
299