Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
6388 Lượt xem

Hi,

Anyone has idea how to replace home page in v11?

Rgds,

Anil


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

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?

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 7 22
9261
0
thg 11 24
3089
0
thg 6 21
2545
1
thg 6 21
2527
2
thg 2 21
299