[FIX] Don't set content_parsed an HTML field or it will be sanitized

This commit is contained in:
Yann Papouin 2020-11-04 14:36:16 +01:00
parent 90d6ea742a
commit 33231e07f5

View File

@ -49,7 +49,10 @@ class DocumentPage(models.Model):
reference = fields.Char(
help="Used to find the document, it can contain letters, numbers and _"
)
content_parsed = fields.Html(compute='_compute_content_parsed')
# Do not set this field as HTML or it will be sanitized in
# `convert_to_cache` in `odoo/odoo/fields.py` and iframe tags will
# be removed
content_parsed = fields.Text(compute='_compute_content_parsed')
@api.depends('history_head')
def _compute_content_parsed(self):