On odoo 8.0 I need to override parent model init() method, but the new init() is never called upon upgrading the module
Is there some obscure undocumented odoo trick for this?
class A(models.Model):
_name = "A"
_auto = False
columnA = ....
def init(self, cr):
# ... here there is a CREATE VIEW ....
# in another module...
class A(models.Model)
_inherit = "A"
_auto = False
columnB = ....
def init(self, cr):
#... NEW VIEW DEFINITION ...
Upon upgrading the module, inherited init() never gets called. It always calls parent (class A) init method.
Amazingly, columnB is created in the modelA, hence inherited class is considered.... but at run time, its init() method is not called*
- Verified in debug mode and with breakpoints set