- Disable sending of notification emails when events are created or updated
in Odoo during a CalDAV server synchronization.
- General code cleanup with improved type hints.
Prior to this fix, the organizer on events was being incorrectly set to
the database's admin user in some cases, when synchronizing an event
from the CalDAV server.
* Fixed an issue where accepting events from an external organizer would send emails
to the all event attendees upon synchronization.
* Corrected the data model for events where multiple Odoo users are attendees for the
same event. Now, only one event is created in Odoo, with all the attendees on the
same event. This conforms to Odoo's existing calendar event data model.
* Updated the setting of the organizer field (user_id) on the calendar events upon
synchronization. Previously, the organizer field was always set to the current user
whose events were being synchronized. Now, it is set based on the ORGANIZER parameter
of the iCalendar event, if present. If not present, it defaults to the current synchronizing
user. In the case that the organizer is external, the user_id field is left blank.
Prior to this commit, subtasks that were added (from task templates) as
part of a visit (from sales orders), were having their partner_id set to
False by a built-in Odoo _compute_partner_id method.
This fix (and previous commits) introduce a test that correctly failed
when this behaviour was broken as well as modifications to the behaviour
of sale order lines and tasks to ensure that all tasks created from a
sale order for an FSM project correctly get their partner_id set to the
sale order's delivery address.
* Fixed an issue where accepting events from an external organizer would send emails
to the all event attendees upon synchronization.
* Corrected the data model for events where multiple Odoo users are attendees for the
same event. Now, only one event is created in Odoo, with all the attendees on the
same event. This conforms to Odoo's existing calendar event data model.
* Updated the setting of the organizer field (user_id) on the calendar events upon
synchronization. Previously, the organizer field was always set to the current user
whose events were being synchronized. Now, it is set based on the ORGANIZER parameter
of the iCalendar event, if present. If not present, it defaults to the current synchronizing
user. In the case that the organizer is external, the user_id field is left blank.
Prior to this commit, synchronizing an event to the CalDAV server could
break in the _add_event_dates method if both self.event_tz and
self.env.user.tz were empty (False). This should be a rare occurrence,
but adding a fallback of self._context.get('tz') should help.