Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
6333 Переглядів

Hi,

Anyone has idea how to replace home page in v11?

Rgds,

Anil


Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Автор

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 Відповіді Переглядів Дія
2
лип. 22
9064
0
лист. 24
2863
0
черв. 21
2448
1
черв. 21
2335
2
лют. 21
299