Odoo Help

0

How this http route can stay empty?

By
Pascal Tremblay
on 8/20/15, 8:13 PM 1,009 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

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.

Register

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)

Stats

Asked: 8/20/15, 8:13 PM
Seen: 1009 times
Last updated: 8/20/15, 8:13 PM