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 4f9a207
Show file tree
Hide file tree
Showing 2 changed files with 18 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.esm.js",
],
},
"installable": True,
}
13 changes: 13 additions & 0 deletions statechart/static/src/core/errors/error_dialogs.esm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/** @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 4f9a207

Please sign in to comment.