[FIX] google_calendar: Google doesn't allow wrong attendee emails
Odoo allows bad formatted emails for partners (and attendees). Google doesn't. Therefore, upon sync, if the email is wrong, we do not send it to Google, to avoid Google being mad at us. opw-646369
This commit is contained in:
parent
dd500b34b7
commit
4d9cef5412
|
@ -216,8 +216,10 @@ class google_calendar(osv.AbstractModel):
|
|||
vstype = 'date'
|
||||
attendee_list = []
|
||||
for attendee in event.attendee_ids:
|
||||
email = tools.email_split(attendee.email)
|
||||
email = email[0] if email else 'NoEmail@mail.com'
|
||||
attendee_list.append({
|
||||
'email': attendee.email or 'NoEmail@mail.com',
|
||||
'email': email,
|
||||
'displayName': attendee.partner_id.name,
|
||||
'responseStatus': attendee.state or 'needsAction',
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue