跳至内容
菜单
此问题已终结
1 回复
6353 查看

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?

相关帖文 回复 查看 活动
2
7月 22
9105
0
11月 24
2895
0
6月 21
2454
1
6月 21
2386
2
2月 21
299