diff options
| author | Achraf (abz) <abz@odoo.com> | 2020-11-26 12:50:52 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2020-11-26 12:57:42 +0000 |
| commit | f6a610d0b1379aa97ad97fb7494a5d269da87775 (patch) | |
| tree | fa3bf96893adcccf3b9179021023e3307039bfdf /addons/google_calendar | |
| parent | 7b8abac93a588a7a2a653275dd1e2f33c876ff52 (diff) | |
[FIX] calendar, google_calendar, hr_holidays: lost attendees after sync
What are the steps to reproduce your issue ?
1. Install "google_calendar"
2. Log in with "admin"
3. Create an eventX with "admin" and "demo" has attendees
4. Run "Google Calendar Synchronization" from "Scheduled Actions"
What is currently happening ?
eventX is successfully added to Google but without admin
if you sync Odoo to Google one more time, Google will overwrite eventX
and it will remove admin from attendees
What are you expecting to happen ?
Sync Odoo to Google and Google to Odoo without lost attendees
Why is this happening ?
Because there is a filter that prevent addition of current user to the attendees
How to fix the bug ?
Remove the filter
This reverts commit 287ee0f83ae6fd457e5356860c8a8ab5a4e66754.
opw-2382443
closes odoo/odoo#62406
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/google_calendar')
| -rw-r--r-- | addons/google_calendar/models/calendar.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/google_calendar/models/calendar.py b/addons/google_calendar/models/calendar.py index 80d2cb7ca9d..765473509ba 100644 --- a/addons/google_calendar/models/calendar.py +++ b/addons/google_calendar/models/calendar.py @@ -167,7 +167,6 @@ 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, @@ -177,7 +176,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 attendee_ids], + 'attendees': [{'email': attendee.email, 'responseStatus': attendee.state} for attendee in self.attendee_ids], 'extendedProperties': { 'shared': { '%s_odoo_id' % self.env.cr.dbname: self.id, |
