Odoo Help


What is the use of @http.route('/hello/world', auth='public') from web site module

on 2/10/15, 2:49 AM 1,780 views

Hi any body explain this  @http.route usage in below code 

@http.route('/hello/world', auth='public')('/hello/world', auth='public')
    def test_con(self):

return "Hello World"


Dhinesh - Technical Consultant, Sodexis Inc

--Dhinesh - Technical Consultant, Sodexis Inc--
| 5 4 9
Pondicherry, India
--Dhinesh - Technical Consultant, Sodexis Inc--

Passionate coder in Python/OpenERP. Knows Django/Flask MVC frameworks. Did code in Java, PHP.

Contact me at: dvdhinesh.mail@gmail.com

Dhinesh - Technical Consultant, Sodexis Inc
On 2/10/15, 5:09 AM

It is called web controller. Decorator marking the decorated method as being a handler for requests. The method must be part of a subclass of Controller.

If you enter localhost:8070/web/hello/world, it will print "Hello world" in your browser. This is responsible to decide which page is shown in which url. The parament auth is for authentication purpose. Is this page is shown for all or only logged in user only can view it. For more...

The type of authentication method, can be one of the following:

  • user: The user must be authenticated and the current request will perform using the rights of the user.
  • admin: The user may not be authenticated and the current request will perform using the admin user.
  • none: The method is always active, even if there is no database. Mainly used by the framework and authentication modules. There request code will not have any facilities to access the database nor have any configuration indicating the current database nor the current user.
  • public: public authentication, not login required.

Thanks Dhinesh....

on 2/10/15, 5:20 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/10/15, 2:49 AM
Seen: 1780 times
Last updated: 3/16/15, 8:10 AM