mirror of
https://github.com/odoo/design-themes.git
synced 2025-10-07 01:18:52 +07:00
0e2497b8e8
This commit introduces a new theme for tests purpose. The goal is to be able to create records and simulate a real use case without only testing through unit tests in python. For instance, with this commit, we now fully test: - menu creation - page creation - new header & footer template - new image shape & background shape This will be extended later to be able to test other stuff too, maybe like changing the website logo (not supported yet). Also, our existing standalone test in themes should use this theme instead of nano to not rely on a real theme that might change. Courtesy of NMI as this theme is partly based on his job. closes odoo/design-themes#586 Related: odoo/odoo#99099 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
43 lines
2.1 KiB
XML
43 lines
2.1 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">
|
|
<li t-foreach="request.env['website.menu'].search([('url', '=', '/main-menu-animals'), ('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>
|