[FIX] runbot: init method may not exists on parent class

This commit is contained in:
Christophe Simonis 2017-11-14 16:58:56 +01:00
parent cdf4cd8287
commit 0c3c8a0b75

View File

@ -1339,7 +1339,10 @@ class runbot_event(osv.osv):
}
def init(self, cr):
super(runbot_event, self).init(cr)
parent_class = super(runbot_event, self)
if hasattr(parent_class, 'init'):
parent_class.init(cr)
cr.execute("""
CREATE OR REPLACE FUNCTION runbot_set_logging_build() RETURNS TRIGGER AS $$
BEGIN