mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 16:48:36 +00:00
registry is useless in the second branch
This commit is contained in:
@@ -240,10 +240,10 @@ class IrAttachment(models.Model):
|
|||||||
Using a new Odoo Environment thus a new PG transaction.
|
Using a new Odoo Environment thus a new PG transaction.
|
||||||
"""
|
"""
|
||||||
with api.Environment.manage():
|
with api.Environment.manage():
|
||||||
|
if new_cr:
|
||||||
registry = openerp.modules.registry.RegistryManager.get(
|
registry = openerp.modules.registry.RegistryManager.get(
|
||||||
self.env.cr.dbname
|
self.env.cr.dbname
|
||||||
)
|
)
|
||||||
if new_cr:
|
|
||||||
with closing(registry.cursor()) as cr:
|
with closing(registry.cursor()) as cr:
|
||||||
try:
|
try:
|
||||||
yield self.env(cr=cr)
|
yield self.env(cr=cr)
|
||||||
|
|||||||
Reference in New Issue
Block a user