From 25ad0bb08c55fcdf950385d7469a7fcb447187cb Mon Sep 17 00:00:00 2001 From: dht-odoo Date: Tue, 14 Dec 2021 06:29:39 +0000 Subject: [PATCH] [FIX] hr_skills_slides: keep plaintext description on 'hr.resume.line' In the `slide.channel`, description field was converted from Text type to HTML(see commit[1]). This field is also used as a description of the `hr.resume.line` model. However the later one expects plaintext value but gets the HTML. This leads to displaying HTML tags to the users. With this commit, we convert description of the `slide.channel` into plaintext before adding it as a description of `hr.resume.line`. commit[1] - https://github.com/odoo/odoo/commit/6d914c005183aa5ae69650e3002a5a85ca83b4a6 taskID-2711308 closes odoo/odoo#81457 X-original-commit: f8eaf7b69085a475a50c24bb732a95bf7ef0d7a9 Signed-off-by: Thibault Delavallee (tde) --- addons/hr_skills_slides/models/slide_channel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/hr_skills_slides/models/slide_channel.py b/addons/hr_skills_slides/models/slide_channel.py index 5729f02c9ce..6189ee35324 100644 --- a/addons/hr_skills_slides/models/slide_channel.py +++ b/addons/hr_skills_slides/models/slide_channel.py @@ -2,6 +2,7 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models +from odoo.tools import html2plaintext class SlideChannelPartner(models.Model): @@ -19,7 +20,7 @@ class SlideChannelPartner(models.Model): 'name': channel.name, 'date_start': fields.Date.today(), 'date_end': fields.Date.today(), - 'description': channel.description, + 'description': html2plaintext(channel.description), 'line_type_id': line_type and line_type.id, 'display_type': 'course', 'channel_id': channel.id