From efa7f87cc84d03eb40511b844a2109f377785979 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Thu, 2 Aug 2018 10:15:53 +0200 Subject: [PATCH] [FIX] calendar: event from activity strip text from html From a SO (for example), create an activity with type meeting Create the calendar event Access it as a guest with the route with the token Before this commit, there was an error 500 because the description of the event actually contained "\n" and was not parseable After this commit, we strip the string at event creation, and no error occur OPW 1867283 closes #25795 --- addons/calendar/models/mail_activity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/calendar/models/mail_activity.py b/addons/calendar/models/mail_activity.py index 3efcea70a3b..0741658a087 100644 --- a/addons/calendar/models/mail_activity.py +++ b/addons/calendar/models/mail_activity.py @@ -24,7 +24,7 @@ class MailActivity(models.Model): 'default_res_id': self.env.context.get('default_res_id'), 'default_res_model': self.env.context.get('default_res_model'), 'default_name': self.summary, - 'default_description': self.note and tools.html2plaintext(self.note) or '', + 'default_description': self.note and tools.html2plaintext(self.note).strip() or '', 'default_activity_ids': [(6, 0, self.ids)], } return action