Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Exception Rule

Entity: base.exception

Compute Method: _compute_exceptions_summary

View 17.0 View 19.0
Inputs Method Outputs
  • exception_ids
  • ignore_exception
for rec in self:
            if rec.exception_ids and not rec.ignore_exception:
-                 rec.exceptions_summary = "<ul>%s</ul>" % "".join(
-                     [
-                         f"<li>{html.escape(e.name)}: <i>"
-                         f"{html.escape(e.description or '')}</i> <b>"
-                         + _(
-                             f"{'(Blocking exception)' if e.is_blocking else ''}"
-                             f"</b></li>"
+                 rec.exceptions_summary = "<ul>{}</ul>".format(
+                     "".join(
+                         "<li>{}: <i>{}</i> <b>{}</b></li>".format(
+                             html_escape(e.name),
+                             html_escape(e.description or ""),
+                             "(Blocking exception)" if e.is_blocking else "",
                        )
                        for e in rec.exception_ids
-                     ]
+                     )
                )
            else:
                rec.exceptions_summary = False
  • exceptions_summary

Back to entity