[FIX] web: scope legacy indicator to debug mode

With this commit, we only display the "legacy" indicator (red/pink
background color to indicate old widgets in new views) in debug mode.

Part-of: odoo/odoo#92475
This commit is contained in:
Géry Debongnie
2022-06-30 09:29:50 +02:00
committed by Aaron Bohy
parent 2b7f497442
commit f5f65f26be
3 changed files with 5 additions and 2 deletions
@@ -1,3 +1,3 @@
.o_legacy_field_widget > * {
.o_debug .o_legacy_field_widget > * {
background-color: rgba(255, 0, 0, 0.1);
}
+1 -1
View File
@@ -3,7 +3,7 @@
* all renderers. For field default rules, see the fields.scss file.
*/
.o_legacy_kanban_view {
.o_debug .o_legacy_kanban_view {
border-top: 2px solid red;
}
+3
View File
@@ -56,6 +56,9 @@ export async function startWebClient(Webclient) {
if (env.services.user.userId === 1) {
classList.add("o_is_superuser");
}
if (env.debug) {
classList.add("o_debug");
}
// delete odoo.debug; // FIXME: some legacy code rely on this
odoo.__WOWL_DEBUG__ = { root };
odoo.isReady = true;