Files
design-themes/theme_odoo_experts/views/snippets/s_mockup_image.xml
T
Alessandro Lupo dcbe2287af [FIX] theme_anelusia, *: 'web_editor' to 'html_builder' in shapeId
* theme_artists, theme_avantgarde, theme_beauty, theme_bistro, theme_buzzy,
    theme_clean, theme_graphene, theme_kea, theme_kiddo, theme_monglia,
    theme_nano, theme_odoo_experts, theme_orchid, theme_real_estate,
    theme_treehouse, theme_vehicle, theme_zap

**Problem**
Some snippets contain shapes whose ID starts with `web_editor` instead of
`html_builder`. These IDs are not listed in imageShapeDefinitions [1], and
this generates a traceback when trying to apply shape tranformations.

**How to reproduce**
1. Insert the snippet `s_images_constellation`
2. Click on the bottom left image having the "Double Pill" shape
3. Click on any "Transform" button under the "Shape" row in the "Image" section
4. Problem: traceback pops up

**Solution**
This commit replaces `web_editor` with `html_builder` in themes.
See also the changes made to snippets [2] and the migration script [3].

[1] addons/html_builder/static/src/plugins/image/image_shapes_definition.js
[2] https://github.com/odoo/odoo/pull/218837
[3] https://github.com/odoo/upgrade/pull/8076

task-4367641

closes odoo/design-themes#1117

Related: odoo/odoo#218837
Related: odoo/enterprise#90482
Related: odoo/upgrade#8076
Signed-off-by: Robin Lejeune (role) <role@odoo.com>
2025-07-19 11:57:29 +00:00

40 lines
2.0 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="s_mockup_image" inherit_id="website.s_mockup_image">
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data"/>
<attribute name="class" add="pt64 pb64" remove="pt72 pb72" separator=" "/>
</xpath>
<!-- Remove shape -->
<xpath expr="//div[hasclass('o_we_shape')]" position="replace"/>
<xpath expr="//div[hasclass('col-lg-4')]" position="replace">
<div class="col-lg-5 pt16 pb16">
<h1>
Unlock the
<span class="o_text_highlight o_translate_inline o_text_highlight_circle_1" style="--text-highlight-color: var(--o-color-1); --text-highlight-width: 6px;"><span class="o_text_highlight_item">growth</span></span>
of your business
</h1>
<p>With over 15 years of proven success, we deliver expert guidance and strategic insights for your businesss future.</p>
<p><br/></p>
<a t-att-href="cta_btn_href" class="btn btn-primary btn-lg"><t t-esc="cta_btn_text">Learn more</t></a>
</div>
</xpath>
<xpath expr="//div[hasclass('col-lg-8')]" position="attributes">
<attribute name="class" add="col-lg-6 offset-lg-1" remove="col-lg-8" separator=" "/>
</xpath>
<!-- Image -->
<xpath expr="//img" position="attributes">
<attribute name="src">/web_editor/image_shape/website.s_image_text_device_perspective/web_editor/devices/iphone_3d_portrait_02.svg?c5=o-color-5</attribute>
<attribute name="data-shape">html_builder/devices/iphone_3d_portrait_02</attribute>
<attribute name="data-format-mimetype">image/webp</attribute>
<attribute name="data-file-name">s_image_text_device_perspective.svg</attribute>
<attribute name="data-shape-colors">;;;;o-color-5</attribute>
<attribute name="style" add="width: 50% !important;" separator=";"/>
<attribute name="class" add="mx-auto" remove="ms-auto" separator=" "/>
</xpath>
</template>
</odoo>