mirror of https://github.com/OCA/web.git
[FIX] web_responsive: Fix blank screen on search (support menus w/o xmlid)
If a menu item is created manually via the Odoo UI, then it (likely) won't have an xmlid. As a result, the `t-foreach` fails, resulting in the whole Odoo UI crashing (a blank white screen is shown). This code should use `id` as the `t-key` instead, as that is *always* available, even for menu items created manually.pull/3037/head
parent
c748cebc39
commit
9438a76226
|
@ -25,7 +25,7 @@
|
||||||
class="list-unstyled search-list"
|
class="list-unstyled search-list"
|
||||||
t-ref="searchItems"
|
t-ref="searchItems"
|
||||||
>
|
>
|
||||||
<t t-foreach="state.rootItems" t-as="menu" t-key="menu.xmlid">
|
<t t-foreach="state.rootItems" t-as="menu" t-key="menu.id">
|
||||||
<li t-attf-class="search-item {{highlighted(menu_index)}}">
|
<li t-attf-class="search-item {{highlighted(menu_index)}}">
|
||||||
<a
|
<a
|
||||||
t-attf-class="search-item__link"
|
t-attf-class="search-item__link"
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
>
|
>
|
||||||
<hr class="w-100" />
|
<hr class="w-100" />
|
||||||
</li>
|
</li>
|
||||||
<t t-foreach="state.subItems" t-as="menu" t-key="menu.xmlid">
|
<t t-foreach="state.subItems" t-as="menu" t-key="menu.id">
|
||||||
<li t-attf-class="search-item {{highlighted(menu_index, true)}}">
|
<li t-attf-class="search-item {{highlighted(menu_index, true)}}">
|
||||||
<a
|
<a
|
||||||
t-attf-class="search-item__link"
|
t-attf-class="search-item__link"
|
||||||
|
|
Loading…
Reference in New Issue