[FIX] calendar: email calendar event attendees

When clicking on the "email" button in the `calendar.event`
form view, the `email_to' field should be filled with the list
of attendee email addresses separated by a comma.

opw-2667016

closes odoo/odoo#81857

X-original-commit: 87e913b892c2518a716fceb247b57ab8c955a07f
Signed-off-by: Arnaud Joset <arj@odoo.com>
This commit is contained in:
Rémy Baranx (bar)
2022-03-16 08:56:31 +01:00
committed by Arnaud Joset
parent 50fb7fd963
commit fe4c65df23
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -360,7 +360,7 @@
<field name="model_id" ref="calendar.model_calendar_event"/>
<field name="subject">{{object.name}}: Event update</field>
<field name="email_from">{{ (object.user_id.email_formatted or user.email_formatted or '') }}</field>
<field name="email_to"></field>
<field name="email_to">{{ object._get_attendee_emails() }}</field>
<field name="lang">{{ object.partner_id.lang }}</field>
<field name="body_html" type="html">
<div>
+5
View File
@@ -717,6 +717,11 @@ class Meeting(models.Model):
# MAILING
# ------------------------------------------------------------
def _get_attendee_emails(self):
""" Get comma-separated attendee email addresses. """
self.ensure_one()
return ",".join([e for e in self.attendee_ids.mapped("email") if e])
def _sync_activities(self, fields):
# update activities
for event in self: