[FIX] mass_mailing: restore website snippets demo page

When mass_mailing was installed, the website snippets demo page did not
work anymore. This is due to a combination of two factors:

A. [1] marked views for removal just before the release of the 16.0 (so
   that they could be removed via an upgrade script later on after
   runbot things) but we forgot to remove them before the release.

B. The views that [1] tweaked and should have been removed contain an
   apparently simple `<div>` with a comment... but it actually acts as
   an xpath looking for a div as it is an extension view. Unfortunately,
   there is a bug in the t-call/inheritance system regarding this: when
   the main view containing this xpath is rendered directly, there is no
   issue (that's what edit mode works: a div is found and nothing is
   added inside). But when it is t-call'ed (as it is the case in the
   snippets demo page), the div cannot be found anymore (it seems to
   look for `/data/div` instead of `/t/div`).

The bug described at B (if it is really a bug) could be worth checking
but this is probably not worth the time until a real usecase occurs. For
now, this commit fixes the broken demo page by removing those useless
xpathing views.

[1]: https://github.com/odoo/odoo/commit/3201eba9fd31602d709b962965e9c1411d1eeb6f#diff-b26221e9411fb6f3725ce5a30c4659a22d81a9a69f666bdbd6daa77e03ec3253R302-R308

task-3233465

closes odoo/odoo#121202

X-original-commit: 10497b96c067c234553bf44d735e51414087bca9
Related: odoo/upgrade#4668
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
qsm-odoo
2023-05-11 19:21:09 +02:00
parent 1e7d24dbbb
commit b3b8dbb858
@@ -303,14 +303,6 @@
</xpath>
</template>
<template id="snippet_options_extra_shapes" inherit_id="web_editor.snippet_options">
<div><!-- TODO remove me in 16.0 post-backport --></div>
</template>
<template id="snippet_options_image_styles" inherit_id="web_editor.snippet_options">
<div><!-- TODO remove me in 16.0 post-backport --></div>
</template>
<!-- Mass Mailing Snippet Options -->
<template id="snippet_options" inherit_id="web_editor.snippet_options" primary="True">
<!-- =================================================================== -->