Files
odoo_source/addons/web_editor/controllers
qsm-odooandJulien Castiaux 0e8e5d4c0a [FIX] web_editor: restore shape on default images in themes
Website themes make customizations to the default snippets. In
particular, some are applying shapes on default images. To do that, the
customization is not applied on the image directly but by changing its
src to a special web_editor route in charge of automatically adding the
shape on whatever default image the configurator chose for this snippet.

Typically, in a snippet with an image whose src is:

/web/image/website.my_snippet_default_image

The src is replaced by the theme with:

/web_editor/image_shape/website.my_snippet_default_image/website/some_shape.svg

That controller/route crashed since [1], making those images blank
areas in pages generated by the configurator. Indeed, the image from
the filestore was accessed via `file_open` which only allows reading
inside the addons_paths.

[1]: https://github.com/odoo/odoo/commit/da8def8e410de68256ba4ab09ebf7a8b699355ac

closes odoo/odoo#105421

X-original-commit: d536e0a23cf0aa06c3ee13fb2c105e83201434e0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Julien Castiaux <juc@odoo.com>
2022-11-09 15:04:03 +01:00
..