[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) <tde@openerp.com>
This commit is contained in:
dht-odoo
2021-12-15 12:07:26 +00:00
committed by Dharmraj Jhala
parent d0252f7022
commit 25ad0bb08c
@@ -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