Search code examples
inheritanceodooopenerp-7openerp-8odoo-8

How inherit to unnamed class and Override its method in OpenERP V8 (Odoo)


I want to inherit to the class called AuthSignupHome for override its method called do_signup, but this class haven't a _name attribute.

The route of the AuthSignupHome class is: odoo/addons/auth_signup/controllers/main.py

I readed to override a method, it's necessary re-define the class' attributes, but it haven...and I don't need it, I'm a little confused for that!

I'm new in odoo, please clarify on easy way, how can I do it?

EDIT: It's a web controller, I was reading the inherit and override from, can anyone provide me a guideline to do that?


Solution

  • I solved it, first building a web module, and the main.py controller

    class MyClass(openerp.addons.auth_signup.controllers.main.AuthSignup):

    inside I override the method

    def do_signup(self, qcontext):

    , thats all :)