What is the purpose of overriding Odoo controllers with an empty @http.route() definition?

62 views Asked by At

The method (and route) must be decorated using route() in order to remain visible. According to the Odoo documentation, if the method is redefined without decorating, it will become "unpublished."

I noted that the function is called in both scenarios, thus I am curious about the differences in workflow between using the route() decorator during overriding and not using it. Has anyone noticed a difference?

1

There are 1 answers

0
maniel On BEST ANSWER

As you noted, if you override a method in Odoo without also adding the route() decorator, you might run into the problem of the method becoming "unpublished," which means that although it is still there in your code, it will not be exposed as an HTTP route and thus cannot be accessed via a URL.