From b9e91458f5fdce9844ae27973e81e0fe857ccc69 Mon Sep 17 00:00:00 2001 From: Telmo Santos Date: Wed, 2 Sep 2020 12:06:39 +0200 Subject: [PATCH] Revert "Log exception" This reverts commit 7c140a3338fe0e29987cae234874c18a851f869a. --- base_attachment_object_storage/models/ir_attachment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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