Skip to content

Commit 7b188aa

Browse files
committed
Fix E8102
1 parent 3aea28b commit 7b188aa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

product_template_attribute_value_xmlid/models/product_template_attribute_value.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,12 @@ def _generate_xmlid_for_record(self, attribute_value):
5151
}
5252
)
5353
except Exception as e:
54-
self.env.cr.rollback() # Rollback in case of error
55-
self.env.cr.commit()
54+
# self.env.cr.rollback() # Removed direct cr.rollback()
55+
# self.env.cr.commit() # Removed direct cr.commit()
5656
self.env.logger.error(
5757
f"Error creating XML ID for product.template.attribute.value: {e}"
5858
)
59+
raise # Re-raise the exception to allow Odoo to handle it
5960

6061
@api.model
6162
def generate_attribute_value_xmlids(self, *args):

0 commit comments

Comments
 (0)