[FIX] website_sale: avoid adding block in a ribbon

Issue:
------
Using the website editor, we can add a content block
to the ribbon (using drag and drop on the product image)
on the shop page of ecommerce.

Solution:
---------
Make the ribbon non-editable so that it will not have the `o_editable`
class added via the `editableElements` function of `WysiwygAdapterComponent`.

opw-3515908

closes odoo/odoo#139993

X-original-commit: 712edead528c6db8b97a8957bcf7bb3c8005d14a
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
This commit is contained in:
Thomas Lefebvre (thle)
2023-10-27 05:11:48 +00:00
parent cb7837470d
commit ccf743154d
+1 -1
View File
@@ -199,7 +199,7 @@
<t t-set="bg_color" t-value="td_product['ribbon']['bg_color'] or ''"/>
<t t-set="text_color" t-value="td_product['ribbon']['text_color']"/>
<t t-set="bg_class" t-value="td_product['ribbon']['html_class']"/>
<span t-attf-class="o_ribbon #{bg_class}" t-attf-style="#{text_color and ('color: %s; ' % text_color)}#{bg_color and 'background-color:' + bg_color}" t-field="product.website_ribbon_id.html"/>
<span t-attf-class="o_ribbon o_not_editable #{bg_class}" t-attf-style="#{text_color and ('color: %s; ' % text_color)}#{bg_color and 'background-color:' + bg_color}" t-field="product.website_ribbon_id.html"/>
</a>
</div>
<div class="o_wsale_product_information position-relative d-flex flex-column flex-grow-1 flex-shrink-1">