Skip to Content
Menu
This question has been flagged
4916 Views

Hello there,

In the file odoo-8.0-20150819/openerp/addons/auth_signup/controllers/main.py, for example, the http.route() doesn't have argument. No route in the brackets. How could it be possible?

See here :


class AuthSignupHome(openerp.addons.web.controllers.main.Home):

    @http.route()
    def web_login(self, *args, **kw):
        _logger.error("WEB LOGIN AUTHSIGNUPHOME")
        ensure_db()
        response = super(AuthSignupHome, self).web_login(*args, **kw)
        response.qcontext.update(self.get_auth_signup_config())
        if request.httprequest.method == 'GET' and request.session.uid and request.params.get('redirect'):
            # Redirect if already logged in and redirect param is present
            return http.redirect_with_hash(request.params.get('redirect'))
        _logger.error("END WEB LOGIN AUTHSIGNUPHOME")
        return response


If I try to override it in a custom module, I get this error :

....   assert routing['routes'], "Method %r has not route defined" % mv ..........

Could you explain please what is this concept of empty route?

Thanks

Avatar
Discard
Related Posts Replies Views Activity
0
Jun 24
675
3
May 21
2904
2
Dec 19
4715
4
May 18
2931
1
Mar 18
11960