import os
import re
import sys
+import threading
import zipfile
import zipimport
cr.commit()
if not tools.config.options['test_disable']:
try:
+ threading.currentThread().testing = True
_load_data(cr, module_name, idref, mode, 'test')
except Exception, e:
logging.getLogger('init.test').exception(
'Tests failed to execute in module %s', module_name)
finally:
+ threading.currentThread().testing = False
if tools.config.options['test_commit']:
cr.commit()
else:
# STEP 1: LOAD BASE (must be done before module dependencies can be computed for later steps)
graph = openerp.modules.graph.Graph()
- graph.add_module(cr, 'base', force)
+ graph.add_module(cr, 'base', force_demo)
if not graph:
logger.notifyChannel('init', netsvc.LOG_CRITICAL, 'module base cannot be loaded! (hint: verify addons-path)')
raise osv.osv.except_osv(_('Could not load base module'), _('module base cannot be loaded! (hint: verify addons-path)'))
modobj.update_list(cr, 1)
if 'all' in tools.config['init']:
- pass
+ ids = modobj.search(cr, 1, [])
+ tools.config['init'] = dict.fromkeys([m['name'] for m in modobj.read(cr, 1, ids, ['name'])], 1)
_check_module_names(cr, itertools.chain(tools.config['init'].keys(), tools.config['update'].keys()))