diff --git a/addons/microsoft_calendar/models/calendar.py b/addons/microsoft_calendar/models/calendar.py index 925eb23434a..60012a4b45b 100644 --- a/addons/microsoft_calendar/models/calendar.py +++ b/addons/microsoft_calendar/models/calendar.py @@ -7,7 +7,7 @@ from dateutil.relativedelta import relativedelta from odoo import api, fields, models, _ from odoo.exceptions import UserError, ValidationError -from odoo.tools import html2plaintext, is_html_empty, plaintext2html +from odoo.tools import is_html_empty ATTENDEE_CONVERTER_O2M = { 'needsAction': 'notresponded', @@ -274,8 +274,8 @@ class Meeting(models.Model): if 'description' in fields_to_sync: values['body'] = { - 'content': html2plaintext(self.description) if not is_html_empty(self.description) else '', - 'contentType': "text", + 'content': self.description if not is_html_empty(self.description) else '', + 'contentType': "html", } if any(x in fields_to_sync for x in ['allday', 'start', 'date_end', 'stop']): diff --git a/addons/microsoft_calendar/tests/test_sync_odoo2microsoft.py b/addons/microsoft_calendar/tests/test_sync_odoo2microsoft.py index 4f5a7b60115..cef20c0ec36 100644 --- a/addons/microsoft_calendar/tests/test_sync_odoo2microsoft.py +++ b/addons/microsoft_calendar/tests/test_sync_odoo2microsoft.py @@ -88,7 +88,7 @@ class TestSyncOdoo2Microsoft(TransactionCase): 'start': {'dateTime': '%s-01-15T08:00:00+00:00' % year, 'timeZone': 'Europe/London'}, 'end': {'dateTime': '%s-01-15T18:00:00+00:00' % year, 'timeZone': 'Europe/London'}, 'subject': 'Event', - 'body': {'content': '', 'contentType': 'text'}, + 'body': {'content': '', 'contentType': 'html'}, 'attendees': [], 'isAllDay': False, 'isOrganizer': True,