[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>
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user