As several customers complained about lot of bugs in microsoft_calendar in 14.0, It has been decided to backport bug fixes of the model layer from master to 14.0, without the need of an upgrade script (no new field, ...). In master, we use 2 ids (organizer event id + universal id) instead of only one, to handle Odoo <-> Outlook sync correctly when several attendees sync their Outlook calendar with their Odoo calendar. For that, we have added a new field. To report this bug fix in 14.0, the existing field which stores the organizer event id, is now a string storing both ids separated by a ':' as follow: 'organizer_event_id:universal_id'. 2 new compute fields have been added to be able to use these 2 ids more easily. (all commits from the original PR have been squashed to ease forward-port) closes odoo/odoo#95736 X-original-commit: 5e83318a7240585371efd31e407829793f3e732f Signed-off-by: Arnaud Joset <arj@odoo.com> Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
11 lines
284 B
Python
11 lines
284 B
Python
IDS_SEPARATOR = ':'
|
|
|
|
def combine_ids(ms_id, ms_uid):
|
|
if not ms_id:
|
|
return False
|
|
return ms_id + IDS_SEPARATOR + (ms_uid if ms_uid else '')
|
|
|
|
def split_ids(value):
|
|
ids = value.split(IDS_SEPARATOR)
|
|
return tuple(ids) if len(ids) > 1 and ids[1] else (ids[0], False)
|