From bc21c5421c4e170ba044701777feb06a9136dddf Mon Sep 17 00:00:00 2001 From: "Gabriel de Paula Felix (gdpf)" Date: Tue, 21 Nov 2023 06:29:50 -0300 Subject: [PATCH] [FIX] microsoft_calendar: remove restriction changing organizer and remove useless call Before this commit, when changing the event organizer to a new one, if the new organizer was not synced with Odoo a ValidationError was being thrown requesting that the new organizer must be added as attendee when it shouldn't (since the new organizer is not synced with Outlook). Additionaly, there was an extra call being made to the method `_is_microsoft_calendar_valid()` in the user synchronization checking which should be removed. After this commit, this restriction is removed: the new organizer won't need to be added as attendee during this change of event organizers and the extra call to `_is_microsoft_calendar_valid()` is removed. Issue from: 3450045 closes odoo/odoo#142989 X-original-commit: 79ec916580452a49147600441eb8d09a98322665 Signed-off-by: Arnaud Joset (arj) --- addons/microsoft_calendar/models/calendar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/microsoft_calendar/models/calendar.py b/addons/microsoft_calendar/models/calendar.py index eaf47cf9db0..565b65da93c 100644 --- a/addons/microsoft_calendar/models/calendar.py +++ b/addons/microsoft_calendar/models/calendar.py @@ -70,7 +70,7 @@ class Meeting(models.Model): Returns True if synchronization with Outlook Calendar is active and False otherwise. The 'microsoft_synchronization_stopped' variable needs to be 'False' and Outlook account must be connected. """ - outlook_connected = self.env.user._get_microsoft_calendar_token() and self.env.user._is_microsoft_calendar_valid() + outlook_connected = self.env.user._get_microsoft_calendar_token() return outlook_connected and self.env.user.microsoft_synchronization_stopped is False @api.model_create_multi