[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:
Vo Minh Thu 2013-03-27 16:23:22 +01:00
parent 314a8dab70
commit 5134bf4b94
2 changed files with 1 additions and 9 deletions

View File

@ -60,12 +60,5 @@ def registry(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:

View File

@ -168,7 +168,7 @@ class ir_model(osv.osv):
if not context.get(MODULE_UNINSTALL_FLAG):
# only reload pool for normal unlink. For module uninstall the
# reload is done independently in openerp.modules.loading
openerp.new_registry(cr.dbname)
openerp.modules.registry.RegistryManager.new(cr.dbname)
return res
@ -194,7 +194,6 @@ class ir_model(osv.osv):
field_state='manual',
select=vals.get('select_level', '0'))
self.pool[vals['model']]._auto_init(cr, ctx)
# openerp.new_registry(cr.dbname)
return res
def instanciate(self, cr, user, model, context=None):