X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=openerp%2Fmodules%2Floading.py;h=5d274f6614bc47377ff498d304a6860b568d3626;hb=389257c0090a9bcd00ff22079e9fff2b32b2f59a;hp=d0b18632e31f839c58c25f195ba49e6a98e9da85;hpb=b6b25ea70639bfe2eb5c1249e7b1d40216ab545b;p=odoo%2Fodoo.git diff --git a/openerp/modules/loading.py b/openerp/modules/loading.py index d0b1863..5d274f6 100644 --- a/openerp/modules/loading.py +++ b/openerp/modules/loading.py @@ -31,6 +31,7 @@ import logging import os import re import sys +import threading import zipfile import zipimport @@ -97,11 +98,13 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules= 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: @@ -281,7 +284,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False): # 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)'))