diff --git a/base_attachment_object_storage/models/ir_attachment.py b/base_attachment_object_storage/models/ir_attachment.py index 6b72fec..0a3ecfa 100644 --- a/base_attachment_object_storage/models/ir_attachment.py +++ b/base_attachment_object_storage/models/ir_attachment.py @@ -266,8 +266,8 @@ class IrAttachment(models.Model): try: yield self.env(cr=cr) except Exception: - _logger.exception("Error creating new odoo " - "environment") + cr.rollback() + raise else: # disable pylint error because this is a valid commit, # we are in a new env