summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2011-01-27 10:55:05 +0100
committerOlivier Dony <odo@openerp.com>2011-01-27 10:55:05 +0100
commit4ebc3b55f05ad6b61579128ebf302d8d8e8fad65 (patch)
tree83413abffaca8a4a3269ad3d57451b30c5089a1d /bin
parentc456ff0d7636fd722f17e366cb1aa696a101de63 (diff)
[FIX] addons: restore proper loading of custom osv models (manual customizations)
bzr revid: odo@openerp.com-20110127095505-6wiq7jwkzylsc2i6
Diffstat (limited to 'bin')
-rw-r--r--bin/addons/__init__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/addons/__init__.py b/bin/addons/__init__.py
index bbf391603a2..94d6a0dfdf6 100644
--- a/bin/addons/__init__.py
+++ b/bin/addons/__init__.py
@@ -882,13 +882,13 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
logger.notifyChannel('init', netsvc.LOG_DEBUG, 'Updating graph with %d more modules' % (len(module_list)))
processed_modules.extend(load_module_graph(cr, graph, status, report=report, skip_modules=processed_modules))
+ # load custom models
+ cr.execute('select model from ir_model where state=%s', ('manual',))
+ for model in cr.dictfetchall():
+ pool.get('ir.model').instanciate(cr, 1, model['model'], {})
+
# STEP 4: Finish and cleanup
if processed_modules:
- # load custom models
- cr.execute('select model from ir_model where state=%s', ('manual',))
- for model in cr.dictfetchall():
- pool.get('ir.model').instanciate(cr, 1, model['model'], {})
-
cr.execute("""select model,name from ir_model where id NOT IN (select distinct model_id from ir_model_access)""")
for (model, name) in cr.fetchall():
model_obj = pool.get(model)