[FIX] addons: restore proper loading of custom osv models (manual customizations) - backport from trunk
bzr revid: odo@openerp.com-20110127095654-z5c87abnzpjqsnag
This commit is contained in:
parent
c1c5909f2d
commit
d20312211d
|
@ -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)))
|
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))
|
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
|
# STEP 4: Finish and cleanup
|
||||||
if processed_modules:
|
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)""")
|
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():
|
for (model, name) in cr.fetchall():
|
||||||
model_obj = pool.get(model)
|
model_obj = pool.get(model)
|
||||||
|
|
Loading…
Reference in New Issue