Ivan Yelizariev 153fe67f46 [FIX] microsoft_calendar: avoid errors on events without user_id
Field `user_id` of `event.event` is not required

https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/event/models/event_event.py#L119-L121

---

So, `ensure_one` might raise an error in `_microsoft_patch  >
microsoft_calendar_token > _get_microsoft_calendar_token`

https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/microsoft_calendar/models/microsoft_sync.py#L404-L420

https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/microsoft_calendar/models/microsoft_sync.py#L51-L53

https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/microsoft_calendar/models/res_users.py#L35-L39

---

`_microsoft_patch` is used for syncing Odoo data with Outlook calendar

https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/microsoft_calendar/models/calendar_attendee.py#L23-L51

https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/microsoft_calendar/models/microsoft_sync.py#L96

https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/microsoft_calendar/models/microsoft_sync.py#L204

---

Ignoring such an error seems fine, because `_microsoft_patch` is used after
commiting the changes to database anyway

https://github.com/odoo/odoo/blob/6b101d5ff0ad78b9ae2ad312f362c2224e7af457/addons/microsoft_calendar/models/microsoft_sync.py#L24-L49

---

closes odoo/odoo#111587

Ref: https://sentry.io/organizations/online/issues/3907527262/
X-original-commit: 68c5e649af67b8dc1f9c2470356b72011b32e393
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2023-02-03 01:13:39 +01:00
2023-01-03 13:16:02 +01:00
…
…
…
…
2023-01-03 13:16:02 +01:00
2023-01-03 13:16:02 +01:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%