summaryrefslogtreecommitdiff
path: root/addons/web_editor
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2021-02-18 09:55:27 +0000
committerNicolas Lempereur <nle@odoo.com>2021-02-18 11:52:45 +0000
commit4cd7af47432869023214a0410229398e9fcc44d8 (patch)
tree35c20a9bdb36b16da74a9594cd57639bf54d1434 /addons/web_editor
parente1eeb8dca2cc83b8a79d9bf5120a589df01bf867 (diff)
[FIX] web_editor: have video button even if sanitized
If a field is sanitized, a6e2b484e2 would hide the video button because the video does not show in backend. It is better for the consistency but if the field appear in frontend, the video would still show so we prevent something that worked (but is very not user friendly when editing in backend). This changeset go back to the previous behavior (keeping the code simplification), at one point there should be a fix so at least when editing we see the video (currently we see an empty div in given conditions). opw-2463746 closes odoo/odoo#66449 X-original-commit: 73f578192e453f7f8d276604017625b5e712b875 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons/web_editor')
-rw-r--r--addons/web_editor/static/src/js/backend/field_html.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/backend/field_html.js b/addons/web_editor/static/src/js/backend/field_html.js
index 7b2e4c4ac10..409a9f8dc18 100644
--- a/addons/web_editor/static/src/js/backend/field_html.js
+++ b/addons/web_editor/static/src/js/backend/field_html.js
@@ -225,7 +225,7 @@ var FieldHtml = basic_fields.DebouncedField.extend(TranslatableFieldMixin, {
toolbar.splice(-1, 0, ['view', ['codeview']]);
}
}
- if (self.field.sanitize && self.field.sanitize_tags) {
+ if (self.model === "mail.compose.message" || self.model === "mailing.mailing") {
options.noVideos = true;
}
options.prettifyHtml = false;