Skip to content

Instantly share code, notes, and snippets.

@akhmadkresna
Last active July 19, 2018 04:28
Show Gist options
  • Save akhmadkresna/1f32f29465780e771a48d1f8f44c3a39 to your computer and use it in GitHub Desktop.
Save akhmadkresna/1f32f29465780e771a48d1f8f44c3a39 to your computer and use it in GitHub Desktop.
odoo route
# -*- coding: utf-8 -*-
import odoo.http as http
class your_class(http.Controller):
@http.route('/custom/url', type='http', auth='user', website=True)
def show_custom_webpage(self, **kw):
# render qweb template and parse another parameter data type dictionary, so we have 2 parameter in render method.
return http.request.render('your_module.new_web_page', {})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment