Specify Calendar to Sync - Google Calendar
by Grevlin Global Corp https://www.grevlin.com , Tharcisse Mukundayi https://www.grevlin.com$ 79.50
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Calendar (calendar)
• Discuss (mail) |
| Lines of code | 610 |
| Technical Name |
grev_odoo_google_specify_calendar |
| License | OPL-1 |
| Website | https://www.grevlin.com |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Calendar (calendar)
• Discuss (mail) |
| Lines of code | 610 |
| Technical Name |
grev_odoo_google_specify_calendar |
| License | OPL-1 |
| Website | https://www.grevlin.com |
Specify Which Google Calendar Syncs with OdooLet each user choose exactly which Google Calendar to synchronize — no more being stuck with just the primary one.
|
|
|
|
|
|
|
Need Help?For support, contact us at mukundayi@gmail.com Follow us on X: @GrevlinGlobal ✓ 30 days free support |
|
Specify Calendar to Sync — Google Calendar by Grevlin Global Corp |
Specify Calendar to Sync - Google Calendar
Overview
This module extends Odoo's Google Calendar integration to allow each user to select which of their Google Calendars should be synchronized with Odoo events.
By default, Odoo syncs only the user's primary Google Calendar. With this module installed, users who manage multiple calendars (Work, Team, Projects, Shared) can pick the exact one for synchronization with Odoo events.
Key Features
- Per-user Google Calendar selection
- One-click calendar fetch from Google
- Configurable event migration policies when switching calendars
- Calendar color inheritance from Google to Odoo
- Per-event calendar override from the event form
- ACL roles display with read-only calendar warning
- Seamless integration with Odoo's existing Google OAuth2 setup
- No additional API keys or credentials required
Configuration
Prerequisites
- Install and configure the standard Google Calendar module (:menuselection:`Apps --> Google Calendar`).
- Set up Google OAuth2 credentials in :menuselection:`Settings --> General Settings --> Integrations --> Google Calendar`.
- Install the Specify Calendar to Sync module.
Connecting Your Google Account
Each user must connect their Google account before selecting a calendar:
- Navigate to :menuselection:`Settings --> Users & Companies --> Users`.
- Open your user profile.
- Under the :guilabel:`Calendar` tab, click :guilabel:`Synchronize with Google`.
- Complete the Google OAuth2 authorization flow.
Usage
Fetching Your Calendars
Once your Google account is connected:
- Open your user profile (:menuselection:`Settings --> Users & Companies --> Users`) or your preferences (:menuselection:`Settings --> Preferences`).
- Click the :guilabel:`Fetch My Google Calendars` button.
- All calendars associated with your Google account are loaded, including their names, colors, and your access role.
Selecting a Calendar
After fetching calendars, a dialog appears:
- Choose the desired calendar from the :guilabel:`Calendar` dropdown.
- If you are switching from a previously selected calendar,
configure the event migration policies:
- :guilabel:`User's Existing Events`: Choose whether to leave events untouched, delete from Google, delete from Odoo, or delete from both.
- :guilabel:`Next Synchronization`: Choose whether to synchronize only new events or all existing events.
- Click :guilabel:`Confirm` to save your selection.
All future synchronization operations will use your chosen calendar instead of the primary one.
Tip
You can change your selected calendar at any time by clicking :guilabel:`Fetch My Google Calendars` again and choosing a different calendar.
Warning
If you select a calendar where your access role is reader or freeBusyReader, a warning banner is displayed in the dialog. Odoo will not be able to create or update events in a read-only calendar.
Calendar Color Inheritance
Each Google Calendar has a background color set in Google. When color inheritance is enabled, Odoo event colors automatically mirror that Google Calendar color.
To enable color inheritance:
- Open your user profile or preferences.
- Under the :guilabel:`Calendar` tab, enable the :guilabel:`Inherit Google Calendar Color` toggle.
Once enabled, all events synchronized from your selected Google Calendar will display the matching color in Odoo's calendar view.
Per-Event Calendar Override
Individual events can be routed to a different Google Calendar without changing your default calendar selection.
To override the calendar for a specific event:
- Open the calendar event form.
- Locate the :guilabel:`Google Target Calendar` field (below the :guilabel:`Location` field).
- Select the desired Google Calendar from the dropdown.
- Save the event.
On the next synchronization, that event will be sent to the selected override calendar rather than your default one.
Note
The override calendar must be one of the calendars you have already fetched. Only calendars listed in your :guilabel:`My Google Calendars` are available for selection.
Technical Details
Models
- google.calendar.identification
- Stores the list of Google Calendars available to each user, including the calendar name, Google ID, background color, access_role (owner/writer/reader/freeBusyReader from the Google Calendar List API), and computed odoo_color (mapped from background_color via HSV analysis).
- res.users (extended)
- Adds current_google_calendar_id (the user's selected Google Calendar), user_google_calendar_ids (all fetched calendars), is_google_synced (computed), and google_calendar_inherit_color (color inheritance toggle).
- google.calendar.sync (extended)
- Adds google_calendar_id to tag synced events with the calendar they belong to.
- calendar.event (extended)
- Adds google_target_calendar_id for per-event calendar routing. The _odoo_values() method applies color and calendar tagging; _google_values() injects the _odoo_target_calendar routing hint consumed by the API layer.
API Extensions
The module extends GoogleCalendarService with calendar-aware operations. The get_events, insert, patch, and delete methods accept an optional calendar parameter (defaults to 'primary').
The routing hint _odoo_target_calendar travels in the _google_values() dict and is consumed (popped) by insert() before the payload is sent to Google.
Dependencies
- google_calendar (Odoo Enterprise)
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module
There are no ratings yet!
Seems interesting! Is possible to customize the module allowing to sync the tasks of a project ? I would select a calendar to sync in the project settings and all the task will be in the specific google calendar selected.