[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:
Denis Ledoux 2015-08-04 18:51:22 +02:00
parent dd500b34b7
commit 4d9cef5412
1 changed files with 3 additions and 1 deletions

View File

@ -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',
})