Skip to content
Snippets Groups Projects

Implement caching and optimization for Redner template handling

Merged oury.balde requested to merge topic/17.0/fsb into branch/17.0
2 files
+ 9
3
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 8
3
@@ -449,6 +449,6 @@
# We do NOT depend on the API for consistency here
# So raised error should not result block template deletion
for record in self:
if record.redner_id:
if record.redner_id and record.allow_modification_from_odoo:
try:
self.redner.templates.account_template_delete(record.redner_id)
@@ -453,7 +453,12 @@
try:
self.redner.templates.account_template_delete(record.redner_id)
except Exception:
pass
except Exception as e:
# Log the exception if needed (for debugging purposes)
logger.warning(
"Failed to delete redner template for record %s: %s",
record.id,
{str(e)},
)
return super().unlink()
Loading