Files
design-themes/theme_test_custo/views/footer.xml
T
Mohammed Shekha 15d381a90f [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>
2025-02-14 07:46:21 +00:00

44 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Theme Footer - Option -->
<template id="template_footer_opt" inherit_id="website.snippet_options" name="Test Theme Custom Footer Template - Option">
<xpath expr="//we-select[@data-variable='footer-template']" position="inside">
<we-button title="Custom Theme"
data-customize-website-views="theme_test_custo.template_footer_custom"
data-customize-website-variable="'custom-theme'"
data-img="/theme_test_custo/static/src/img/template_footer_opt.svg"/>
</xpath>
</template>
<!-- Theme Footer - Layout -->
<template id="template_footer_custom" inherit_id="website.layout" name="Test Theme Custom Footer Template">
<xpath expr="//div[@id='footer']" position="replace">
<div id="footer" class="oe_structure oe_structure_solo" t-ignore="true" t-if="not no_footer">
<section class="s_text_block pt24 pb24" data-snippet="s_text_block" data-name="Text">
<div class="container-fluid px-lg-5">
<div class="row">
<div class="col-lg-1 offset-lg-2 pt24 pb24">
<img src="/web/image/theme_test_custo.logo" class="img-fluid rounded-circle" alt=""/>
</div>
<div class="col-lg-6 pt24 pb24 text-center">
<h5 class="mb-4">Useful Links</h5>
<ul class="list-unstyled">
<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"/>
</li>
</ul>
</div>
<div class="col-lg-1 pt24 pb24">
<img src="/web/image/theme_test_custo.logo" class="img-fluid rounded-circle" alt=""/>
</div>
</div>
</div>
</section>
</div>
</xpath>
</template>
</odoo>