How to change default page of odoo with other webcontroller odoo 9.0

后端 未结 1 540
[愿得一人]
[愿得一人] 2021-01-16 11:54

I have created a new webcontroller with specific functionality and I want this webcontroller as a home page of odoo 9.0.

I have tried to put @http

相关标签:
1条回答
  • 2021-01-16 12:26
    # -*- coding: utf-8 -*-
    from openerp import http
    from openerp.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('<your_addon>.<your_template_id>', data)
    
    0 讨论(0)
提交回复
热议问题