Commit Graph
9 Commits
Author SHA1 Message Date
Lucas Lefèvre e7f87c78cc [IMP] google_calendar: Manage account reset
To change your Google Calendar account, the authentication tokens must be set to `False`.
But doing so leaves synchronized events in the database.
This commit adds a wizard to handle those existing events as the user wants.

Task 2126717
PR #42031
PR Enterprise odoo/enterprise#8006
2020-04-09 10:59:33 +02:00
Lucas Lefèvre ae3d37c201 [REF] google_calendar: Refactor synchronisation
This commit refactors calendar synchronization between Odoo and Google after the
main calendar application refactoring.

This refactoring takes advantage of two new features from the Google API:

- New way of synchronizing resources efficiently[1]
Incremental sync is performed repeatedly and updates Odoo with all the changes that
happened ever since the previous sync. Each time, Odoo provides the previous sync
token it obtained from Google and stores the new sync token from the response.

- Event metadata[2]
Ability to set hidden key-value pairs with an event, called extended properties.
These extended properties are used to store the related odoo event id and the Odoo
owner id (see known limitations)

Known limitations
=================
- Let A and B be two new users (no tokens available). A creates an event in Odoo and
invites B. A is the owner of the event (user_id). Now B authenticates to his Google Calendar
account and synchronizes his calendar. We cannot send the event to A's calendar since we
don't have any access to his Google Calendar. Hence the event his sent to B's calendar.
This leads to data de-synchronisation: The owner is A in Odoo but B in Google.
The "real" owner (user A) is stored in the Google event's metadata to be able to
reconcile the owner for following synchronizations.

- Let A and B be two users of Odoo and Google Calendar. And let the Google Calendar of B
be private (e.g. if A creates an event in Google Calendar and invites B, B won't see the
event in his calendar). If A creates an event in Odoo and invites B. The event is synced
to Google Calendar of A. Now B can see the event in Odoo but he can't see it in his
Google Calendar.

Task 2126717
PR #42031
PR Enterprise odoo/enterprise#8006

[1] https://developers.google.com/calendar/v3/sync
[2] https://developers.google.com/calendar/extended-properties
2020-04-09 10:59:33 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Mohammed Shekha 9b39275d85 [MIG] google_calendar: migrate to new api
No behaviour changes, only migrate code and add
some docstring.
2016-08-08 16:27:06 +02:00
Mohammed Shekha d624fdd250 [MOV] google_calendar: moved models and data file in to models and data directory 2016-08-08 16:07:07 +02:00
jke-openerp 3d04737ab1 [TYPO] Rename google_base_account into google_account
bzr revid: jke@openerp.com-20131219142514-8epaqnt0mb16xd4n
2013-12-19 15:25:14 +01:00
jke-openerp 9a130e3157 [IMP] Add wizard and tuto for google synchro. add permission missing on calendar object
bzr revid: jke@openerp.com-20131211163849-z438c5d8m7w4qt3l
2013-12-11 17:38:49 +01:00
jke-openerp 9134c79175 [REF] Synchro method create-delete-update, to replace with always active=False and pre-processing
bzr revid: jke@openerp.com-20131209140819-v0njlfjvl2biep2m
2013-12-09 15:08:19 +01:00
jke-openerp 27a42cc6eb [IMP] google oAuth2 + start synchro calendar (insert ok, bug with recurrent)
bzr revid: jke@openerp.com-20131202143133-u6vi1xw1oa9w8qpf
2013-12-02 15:31:33 +01:00