Skip to content
Extraits de code Groupes Projets
Valider 88896bb8 rédigé par Rémi - Le Filament's avatar Rémi - Le Filament
Parcourir les fichiers

[ADD] Update event from bluemind

parent 4208fddd
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -45,7 +45,7 @@ PRIVACY_CONVERTER_O2B = { ...@@ -45,7 +45,7 @@ PRIVACY_CONVERTER_O2B = {
# TODO: manage attendee_ids, alarm_ids ? # TODO: manage attendee_ids, alarm_ids ?
# TODO: check if recurrency prperly working # TODO: check if recurrency properly working
class CalendarEvent(models.Model): class CalendarEvent(models.Model):
_inherit = "calendar.event" _inherit = "calendar.event"
...@@ -205,16 +205,14 @@ class CalendarEvent(models.Model): ...@@ -205,16 +205,14 @@ class CalendarEvent(models.Model):
) )
return uid.decode() 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): 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, # Take caution about attendees (only one calendar event in Odoo for all attendees,
# when in Bluemind you get a different one per attendee) # when in Bluemind you get a different one per attendee)
def write(self, values, from_bluemind=False): def write(self, values, from_bluemind=False):
# For now this function pushes again the full event to bluemind, # 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) result = super().write(values)
if result and not from_bluemind: if result and not from_bluemind:
bm_events = VEventChanges() bm_events = VEventChanges()
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter