summaryrefslogtreecommitdiff
path: root/addons/google_calendar
diff options
context:
space:
mode:
authorKevin Baptiste <kba@odoo.com>2020-09-09 08:55:19 +0000
committerKevin Baptiste <kba@odoo.com>2020-09-28 10:13:53 +0000
commit287ee0f83ae6fd457e5356860c8a8ab5a4e66754 (patch)
tree5339210758d844723d0ed25d72eda79a46bead0a /addons/google_calendar
parent0c4f2fd9b2039d11f4245f54c5745543b48e8365 (diff)
[FIX] calendar: set attendees on quickcreate
When creating an event through the quickcreate, the user creating the event was not set as attendee. closes odoo/odoo#58580 Taskid: 2334943 X-original-commit: 07d799a5f676ed68fd2ffd9cd9bac3269f947ad1 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com> Signed-off-by: Kevin Baptiste <kba@odoo.com>
Diffstat (limited to 'addons/google_calendar')
-rw-r--r--addons/google_calendar/models/calendar.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/google_calendar/models/calendar.py b/addons/google_calendar/models/calendar.py
index 765473509ba..80d2cb7ca9d 100644
--- a/addons/google_calendar/models/calendar.py
+++ b/addons/google_calendar/models/calendar.py
@@ -167,6 +167,7 @@ class Meeting(models.Model):
'method': "email" if alarm.alarm_type == "email" else "popup",
'minutes': alarm.duration_minutes
} for alarm in self.alarm_ids]
+ attendee_ids = self.attendee_ids.filtered(lambda a: a.partner_id != self.env.user.partner_id)
values = {
'id': self.google_id,
'start': start,
@@ -176,7 +177,7 @@ class Meeting(models.Model):
'location': self.location or '',
'guestsCanModify': True,
'organizer': {'email': self.user_id.email, 'self': self.user_id == self.env.user},
- 'attendees': [{'email': attendee.email, 'responseStatus': attendee.state} for attendee in self.attendee_ids],
+ 'attendees': [{'email': attendee.email, 'responseStatus': attendee.state} for attendee in attendee_ids],
'extendedProperties': {
'shared': {
'%s_odoo_id' % self.env.cr.dbname: self.id,