summaryrefslogtreecommitdiff
path: root/addons/website/static/src/xml/website.contentMenu.xml
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2019-08-28 15:41:22 +0000
committerqsm-odoo <qsm@odoo.com>2019-08-29 07:24:16 +0000
commit3daed421f4c06ce0851efb8eab0071b7fc002bff (patch)
treebd1d73fb85ab7c29fa17a043c6c5ed64065b00d3 /addons/website/static/src/xml/website.contentMenu.xml
parent4e9416b4d58cca1ad0d0a8000c159077a88ba8d3 (diff)
[FIX] website: restore edit menu dialog
Since saas-12.5, with recent ORM changes, writing on non-existing fields does not trigger a warning anymore but instead crashes. This revealed that the 12.0 "Edit Menu" dialog was doing some of that. Indeed, depending on what was edited, we ended up writing on the 'is_homepage' field, the 'text' field, the 'isNewWindow' field, ... which do not exist. This commit takes advantage of the fix to also lint the dialog code and convert some of it to ES6. Discovered while working on task-1925319 closes odoo/odoo#36204 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website/static/src/xml/website.contentMenu.xml')
-rw-r--r--addons/website/static/src/xml/website.contentMenu.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website/static/src/xml/website.contentMenu.xml b/addons/website/static/src/xml/website.contentMenu.xml
index edf166b946d..9c938c38847 100644
--- a/addons/website/static/src/xml/website.contentMenu.xml
+++ b/addons/website/static/src/xml/website.contentMenu.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="website.contentMenu.dialog.submenu">
- <li t-att-data-menu-id="submenu.id">
+ <li t-att-data-menu-id="submenu.fields['id']">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text fa fa-bars" role="img" aria-label="Dropdown menu" title="Dropdown menu"/>
</div>
<span class="form-control d-flex align-items-center">
<span class="js_menu_label o_text_overflow flex-grow-1">
- <t t-esc="submenu.name"/>
+ <t t-esc="submenu.fields['name']"/>
</span>
<i t-if="submenu.is_homepage" class="fa fa-home ml-3" role="img" aria-label="Home" title="Home"/>
</span>