mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-10-22 21:51:57 +00:00
registry is useless in the second branch
This commit is contained in:
1 parent
53d7cdf3e7
commit
5f61ed8985
1 file changed
+3
-3
@@ -240,10 +240,10 @@ class IrAttachment(models.Model):
|
||||
Using a new Odoo Environment thus a new PG transaction.
|
||||
"""
|
||||
with api.Environment.manage():
|
||||
registry = openerp.modules.registry.RegistryManager.get(
|
||||
self.env.cr.dbname
|
||||
)
|
||||
if new_cr:
|
||||
registry = openerp.modules.registry.RegistryManager.get(
|
||||
self.env.cr.dbname
|
||||
)
|
||||
with closing(registry.cursor()) as cr:
|
||||
try:
|
||||
yield self.env(cr=cr)
|
||||
|
||||