mirror of
https://github.com/odoo/design-themes.git
synced 2025-10-07 01:18:52 +07:00
[FIX] theme_test_custo: Update menu search to match URL changes
Issue: With PR [1], the url field for menus has been made required, with a default value of #. This allows parent menus and megamenus to have a URL. However, in the theme_test_custo module, theme menus were previously defined with parent menus having specific URLs. Due to this change, the default url value is now #, making it impossible to search menus by URL. As a result, the theme_menu_hierarchies tour failed. Fix: - Updated the menu search mechanism to align with the new behavior. - Ensured that the tour passes successfully with the modified search logic. [1]: https://github.com/odoo/odoo/pull/160950 closes odoo/design-themes#1042 Task: 3851453 Related: odoo/odoo#160950 Related: odoo/upgrade#5904 Signed-off-by: Robin Lejeune (role) <role@odoo.com>
This commit is contained in:
@@ -62,7 +62,6 @@
|
|||||||
<record id="main_menu_animals" model="theme.website.menu">
|
<record id="main_menu_animals" model="theme.website.menu">
|
||||||
<field name="name">Main Menu Animals</field>
|
<field name="name">Main Menu Animals</field>
|
||||||
<field name="use_main_menu_as_parent" eval="False"/>
|
<field name="use_main_menu_as_parent" eval="False"/>
|
||||||
<field name="url">/main-menu-animals</field>
|
|
||||||
</record>
|
</record>
|
||||||
<record id="menu_dogs" model="theme.website.menu">
|
<record id="menu_dogs" model="theme.website.menu">
|
||||||
<field name="name">Dogs</field>
|
<field name="name">Dogs</field>
|
||||||
|
|||||||
@@ -24,7 +24,8 @@
|
|||||||
<div class="col-lg-6 pt24 pb24 text-center">
|
<div class="col-lg-6 pt24 pb24 text-center">
|
||||||
<h5 class="mb-4">Useful Links</h5>
|
<h5 class="mb-4">Useful Links</h5>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
<li t-foreach="request.env['website.menu'].search([('url', '=', '/main-menu-animals'), ('website_id', '=', request.website.id)]).child_id" t-as="menu">
|
<t t-set="animal_menu" t-value="request.env.ref('theme_test_custo.main_menu_animals')"/>
|
||||||
|
<li t-foreach="request.env['website.menu'].search([('theme_template_id', '=', animal_menu.id), ('website_id', '=', request.website.id)]).child_id" t-as="menu">
|
||||||
<a t-att-href="menu.url" t-esc="menu.name"/>
|
<a t-att-href="menu.url" t-esc="menu.name"/>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user