Correction

bzr revid: jvo@tinyerp.com-20090220102955-sx121iyh5v7guq2l
This commit is contained in:
Jay (Open ERP) 2009-02-20 15:59:55 +05:30
parent 7eb762151c
commit a4ed237edc
1 changed files with 4 additions and 5 deletions

View File

@ -595,7 +595,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs):
status['progress'] = (float(statusi)+0.4) / len(graph)
mode = 'update'
if package.state == 'to install':
if hasattr(package, 'init') or package.state == 'to install':
mode = 'init'
if hasattr(package, 'init') or hasattr(package, 'update') or package.state in ('to install', 'to upgrade'):
@ -603,9 +603,9 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs):
init_module_objects(cr, m, modules)
for kind in ('init', 'update'):
for filename in package.data.get('%s_xml' % kind, []):
mode = 'update'
if hasattr(package, 'init') or package.state == 'to install':
mode = 'init'
# mode = 'update'
# if hasattr(package, 'init') or package.state == 'to install':
# mode = 'init'
logger.notifyChannel('init', netsvc.LOG_INFO, 'module %s: loading %s' % (m, filename))
name, ext = os.path.splitext(filename)
fp = tools.file_open(opj(m, filename))
@ -772,4 +772,3 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: