Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
6346 Vizualizări

Hi,

Anyone has idea how to replace home page in v11?

Rgds,

Anil


Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
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?

Related Posts Răspunsuri Vizualizări Activitate
2
iul. 22
9101
0
nov. 24
2890
0
iun. 21
2453
1
iun. 21
2383
2
feb. 21
299