Skip to content

Commit

Permalink
[CHG] display error pop up instead of stacktrace when raising a Trans…
Browse files Browse the repository at this point in the history
…itionError
  • Loading branch information
benwillig committed Feb 21, 2024
1 parent b76a14c commit e8a9e9c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions statechart/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,10 @@
},
"data": [],
"demo": [],
"assets": {
'web.assets_backend': [
"statechart/static/src/core/errors/error_dialogs.js",
],
},
"installable": True,
}
12 changes: 12 additions & 0 deletions statechart/static/src/core/errors/error_dialogs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/** @odoo-module **/

import { _lt } from "@web/core/l10n/translation";
import { registry } from "@web/core/registry";

import { WarningDialog, odooExceptionTitleMap } from "@web/core/errors/error_dialogs";

registry
.category("error_dialogs")
.add("odoo.addons.statechart.exceptions.NoTransitionError", WarningDialog);

odooExceptionTitleMap["odoo.addons.statechart.exceptions.NoTransitionError"] = _lt("Transition Error")

0 comments on commit e8a9e9c

Please sign in to comment.