[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) <arj@odoo.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user