Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
6309 Zobrazení

Hi,

Anyone has idea how to replace home page in v11?

Rgds,

Anil


Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
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 Odpovědi Zobrazení Aktivita
2
čvc 22
9056
0
lis 24
2859
0
čvn 21
2446
1
čvn 21
2326
2
úno 21
299