[IMP] allow object to call themself in init() method

bzr revid: christophe@tinyerp.com-20090211150124-zn457946r1lg9ttc
This commit is contained in:
Christophe Simonis 2009-02-11 16:01:24 +01:00
parent 759cead482
commit c046bc9920
1 changed files with 2 additions and 2 deletions

View File

@ -336,11 +336,11 @@ def init_module_objects(cr, module_name, obj_list):
logger.notifyChannel('init', netsvc.LOG_INFO, 'module %s: creating or updating database tables' % module_name)
todo = []
for obj in obj_list:
if hasattr(obj, 'init'):
obj.init(cr)
result = obj._auto_init(cr, {'module': module_name})
if result:
todo += result
if hasattr(obj, 'init'):
obj.init(cr)
cr.commit()
todo.sort()
for t in todo: