From f3eb3e3def8dcd713a6e35967d9f89bcd9dbf1d8 Mon Sep 17 00:00:00 2001 From: Lucas Perais Date: Tue, 18 Jul 2023 11:04:49 +0000 Subject: [PATCH] [FIX] web_editor: QWebPlugin branching shows condition Before this commit, when displaying the available conditional branches on a node, the QWebPlugin's select element only had the name of the attribute. This commit adds to this name, the actual condition present inside the attribute. Part-of: odoo/odoo#128228 --- addons/web_editor/static/src/js/backend/QWebPlugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web_editor/static/src/js/backend/QWebPlugin.js b/addons/web_editor/static/src/js/backend/QWebPlugin.js index 897c811cb82..e10f1701fa7 100644 --- a/addons/web_editor/static/src/js/backend/QWebPlugin.js +++ b/addons/web_editor/static/src/js/backend/QWebPlugin.js @@ -201,9 +201,9 @@ export class QWebPlugin { for (const element of groupElements) { const optionElement = document.createElement('option'); if (element.hasAttribute('t-if')) { - optionElement.innerText = 'if'; + optionElement.innerText = `if: "${element.getAttribute("t-if")}"`; } else if (element.hasAttribute('t-elif')) { - optionElement.innerText = 'elif'; + optionElement.innerText = `elif: "${element.getAttribute("t-elif")}"`; } else if (element.hasAttribute('t-else')) { optionElement.innerText = 'else'; }