onesteinbv / addons-onestein

Odoo modules developed by Onestein
https://www.onestein.nl/
GNU Affero General Public License v3.0
59 stars 102 forks source link

Add methods to push events to office365 #77

Closed guewen closed 5 years ago

guewen commented 5 years ago

Add methods to push events to office365

So we can reuse them from other addons. I'll open another pull request to add push of HR leaves.

Use .ok property to validate o365's response

Codes 200 and 204 are not enough, for instance, after a POST, it answers 201.

Add support of all day events

The all day events behaves weirdly on o365. When created from the API, it is really picky on the values we pass, otherwise it ends up displaying an extra day on the calendar. We must have a timezone that matches the one used by the user on o365 (I assume, or it does not like UTC...).

guewen commented 5 years ago

A question for the original author :)

On writes, before pushing there is a check that the current user is equal to the meeting's user, preventing a user to modify another's one. What is the original reason? I think we could sudo with this user.

tarteo commented 5 years ago

A question for the original author :)

On writes, before pushing there is a check that the current user is equal to the meeting's user, preventing a user to modify another's one. What is the original reason? I think we could sudo with this user.

@guewen When the same event has multiple attendees the ID of the event are different for every user. The check was to avoid confusion when users change the event without it actually changing in the Office 365.

tarteo commented 5 years ago

@guewen Thanks alot for all your work!! For the time I created a quick fix, for the all time events (which indeed behave weird). But this seems better.

guewen commented 5 years ago

Thanks to you for the review and merge @tarteo.