[REF] registry: the new_registry() helper is not useful enough, we do not need it at the top-level.
bzr revid: vmt@openerp.com-20130327152322-1bsslx8jicjh26eq
This commit is contained in:
parent
314a8dab70
commit
5134bf4b94
|
@ -60,12 +60,5 @@ def registry(database_name):
|
||||||
"""
|
"""
|
||||||
return modules.registry.RegistryManager.get(database_name)
|
return modules.registry.RegistryManager.get(database_name)
|
||||||
|
|
||||||
def new_registry(database_name):
|
|
||||||
"""
|
|
||||||
Return the model registry for the given database. If the registry already
|
|
||||||
existed, it is deleted and created again.
|
|
||||||
"""
|
|
||||||
return modules.registry.RegistryManager.new(database_name)
|
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,7 @@ class ir_model(osv.osv):
|
||||||
if not context.get(MODULE_UNINSTALL_FLAG):
|
if not context.get(MODULE_UNINSTALL_FLAG):
|
||||||
# only reload pool for normal unlink. For module uninstall the
|
# only reload pool for normal unlink. For module uninstall the
|
||||||
# reload is done independently in openerp.modules.loading
|
# reload is done independently in openerp.modules.loading
|
||||||
openerp.new_registry(cr.dbname)
|
openerp.modules.registry.RegistryManager.new(cr.dbname)
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
@ -194,7 +194,6 @@ class ir_model(osv.osv):
|
||||||
field_state='manual',
|
field_state='manual',
|
||||||
select=vals.get('select_level', '0'))
|
select=vals.get('select_level', '0'))
|
||||||
self.pool[vals['model']]._auto_init(cr, ctx)
|
self.pool[vals['model']]._auto_init(cr, ctx)
|
||||||
# openerp.new_registry(cr.dbname)
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def instanciate(self, cr, user, model, context=None):
|
def instanciate(self, cr, user, model, context=None):
|
||||||
|
|
Loading…
Reference in New Issue