[FIX] registry_cr helper
bzr revid: fme@openerp.com-20130508131308-zafco4lvrmou3203
This commit is contained in:
+1
-1
@@ -121,7 +121,7 @@ class WebRequest(object):
|
||||
@contextlib.contextmanager
|
||||
def registry_cr(self):
|
||||
dbname = self.session._db or openerp.addons.web.controllers.main.db_monodb(self)
|
||||
registry = openerp.modules.registry.Registry(dbname.lower())
|
||||
registry = openerp.modules.registry.RegistryManager.get(dbname.lower())
|
||||
with registry.cursor() as cr:
|
||||
yield (registry, cr)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user