From c046bc9920effa8642c22762a636bbeaf23b5041 Mon Sep 17 00:00:00 2001 From: Christophe Simonis <christophe@tinyerp.com> Date: Wed, 11 Feb 2009 16:01:24 +0100 Subject: [PATCH] [IMP] allow object to call themself in init() method bzr revid: christophe@tinyerp.com-20090211150124-zn457946r1lg9ttc --- bin/addons/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/addons/__init__.py b/bin/addons/__init__.py index 57d5742431e4..e43b91a97b00 100644 --- a/bin/addons/__init__.py +++ b/bin/addons/__init__.py @@ -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: -- GitLab