İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
6363 Görünümler

Hi,

Anyone has idea how to replace home page in v11?

Rgds,

Anil


Avatar
Vazgeç
En İyi Yanı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

Avatar
Vazgeç
Üretici

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?

İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Tem 22
9164
0
Kas 24
2906
0
Haz 21
2474
1
Haz 21
2449
2
Şub 21
299