diff --git a/models/calendar_event.py b/models/calendar_event.py index 6312d657a52997017079e99f0e247f55167a2e47..d2b81c1239e363d921f85655ee6f39c87f7b989d 100644 --- a/models/calendar_event.py +++ b/models/calendar_event.py @@ -45,7 +45,7 @@ PRIVACY_CONVERTER_O2B = { # TODO: manage attendee_ids, alarm_ids ? -# TODO: check if recurrency prperly working +# TODO: check if recurrency properly working class CalendarEvent(models.Model): _inherit = "calendar.event" @@ -205,16 +205,14 @@ class CalendarEvent(models.Model): ) return uid.decode() - # TODO: Create function to update Odoo event from Bluemind updated event def update_odoo_event_from_bm(self, odoo_event, bm_event): - return NotImplementedError() + new_odoo_fields = self._bm_to_odoo_values(bm_event) + odoo_event.write(new_odoo_fields) - # TODO: add function to update Bluemind object when Odoo object is modified # Take caution about attendees (only one calendar event in Odoo for all attendees, # when in Bluemind you get a different one per attendee) def write(self, values, from_bluemind=False): # For now this function pushes again the full event to bluemind, - # TODO: check if this could be improved to push only a few fields ? result = super().write(values) if result and not from_bluemind: bm_events = VEventChanges()