diff --git a/bin/PKG-INFO b/bin/PKG-INFO index b13a196bcff..0cc1f0aa9fc 100644 --- a/bin/PKG-INFO +++ b/bin/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: OpenERP -Version: 5.0.4 +Version: 5.0.7 Author: Tiny.be Author-email: fp at tiny be Maintainer: Tiny.be diff --git a/bin/addons/__init__.py b/bin/addons/__init__.py index 96d23ea171a..b147db854ef 100644 --- a/bin/addons/__init__.py +++ b/bin/addons/__init__.py @@ -60,6 +60,8 @@ ad_paths.append(_ad) # for get_module_path # Modules already loaded loaded = [] +#Modules whch raised error +not_loaded = [] class Graph(dict): @@ -318,9 +320,10 @@ def upgrade_graph(graph, cr, module_list, force=None): mod_path = get_module_path(module) terp_file = get_module_resource(module, '__terp__.py') if not mod_path or not terp_file: + global not_loaded + not_loaded.append(module) logger.notifyChannel('init', netsvc.LOG_WARNING, 'module %s: not installable' % (module)) - cr.execute("update ir_module_module set state=%s where name=%s", ('uninstallable', module)) - continue + raise osv.osv.except_osv('Error!',"Module '%s' was not found" % (module,)) if os.path.isfile(terp_file) or zipfile.is_zipfile(mod_path+'.zip'): try: @@ -372,7 +375,10 @@ 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: - result = obj._auto_init(cr, {'module': module_name}) + try: + result = obj._auto_init(cr, {'module': module_name}) + except Exception, e: + raise if result: todo += result if hasattr(obj, 'init'): @@ -682,7 +688,6 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs): def load_modules(db, force_demo=False, status=None, update_module=False): if not status: status = {} - cr = db.cursor() if cr: cr.execute("SELECT relname FROM pg_class WHERE relkind='r' AND relname='ir_module_module'") @@ -707,6 +712,11 @@ def load_modules(db, force_demo=False, status=None, update_module=False): has_updates = load_module_graph(cr, graph, status, perform_checks=(not update_module), report=report) + global not_loaded + if not_loaded: + #If some module is not loaded don't proceed further + not_loaded = [] + return if update_module: modobj = pool.get('ir.module.module') logger.notifyChannel('init', netsvc.LOG_INFO, 'updating modules list') @@ -744,7 +754,6 @@ def load_modules(db, force_demo=False, status=None, update_module=False): if new_modules_in_graph == 0: # nothing to load break - logger.notifyChannel('init', netsvc.LOG_DEBUG, 'Updating graph with %d more modules' % (len(module_list))) r = load_module_graph(cr, graph, status, report=report) has_updates = has_updates or r diff --git a/bin/addons/base/__terp__.py b/bin/addons/base/__terp__.py index 2e42b5a08e3..f6d31660335 100644 --- a/bin/addons/base/__terp__.py +++ b/bin/addons/base/__terp__.py @@ -33,6 +33,7 @@ 'base_menu.xml', 'security/base_security.xml', 'res/res_security.xml', + 'res/res_config.xml', 'maintenance/maintenance_security.xml' ], 'update_xml': [ @@ -42,6 +43,7 @@ 'ir/workflow/workflow_view.xml', 'module/module_wizard.xml', 'module/module_view.xml', + 'module/module_web_view.xml', 'module/module_data.xml', 'module/module_report.xml', 'res/res_request_view.xml', diff --git a/bin/addons/base/base.sql b/bin/addons/base/base.sql index 58b30a89cf2..ccdfc3847a2 100644 --- a/bin/addons/base/base.sql +++ b/bin/addons/base/base.sql @@ -141,6 +141,7 @@ CREATE TABLE res_users ( active boolean default True, login varchar(64) NOT NULL UNIQUE, password varchar(64) default null, + email varchar(64) default null, context_tz varchar(64) default null, signature text, -- action_id int references ir_act_window on delete set null, diff --git a/bin/addons/base/base_data.xml b/bin/addons/base/base_data.xml index 710bddeb73d..c8d3e39dd22 100644 --- a/bin/addons/base/base_data.xml +++ b/bin/addons/base/base_data.xml @@ -1245,6 +1245,9 @@ Tiny sprl + + + diff --git a/bin/addons/base/base_menu.xml b/bin/addons/base/base_menu.xml index 767a59c3a73..0b85b6a49f8 100644 --- a/bin/addons/base/base_menu.xml +++ b/bin/addons/base/base_menu.xml @@ -2,7 +2,7 @@ - + diff --git a/bin/addons/base/base_update.xml b/bin/addons/base/base_update.xml index ea596c2084e..93c33fd9a9d 100644 --- a/bin/addons/base/base_update.xml +++ b/bin/addons/base/base_update.xml @@ -76,13 +76,21 @@
- -