Calendar Sync Issues
Odoo Calendar can sync with Google Calendar and Microsoft Outlook. When sync breaks, events stop appearing, duplicates are created, or the connection drops entirely. Here are the common problems and their fixes.
Google Calendar Sync Failing
# Symptom: "Sync with Google Calendar failed" error
# Fix 1: Check OAuth credentials
# Settings → General Settings → Integrations
# Google Calendar Client ID and Secret must be valid
# Verify in Google Cloud Console:
# - OAuth consent screen configured
# - Calendar API enabled
# - Correct redirect URI: https://yourdomain.com/google_account/authentication
# Fix 2: Re-authorize
# Calendar → Sync → Disconnect Google Account
# Reconnect and authorize again
# Accept all requested permissions
# Fix 3: Check API quotas
# Google Cloud Console → APIs → Calendar API → Quotas
# Default: 1,000,000 queries/day
# If exceeded, sync fails silentlyOutlook Calendar Sync
# Symptom: Microsoft sync connection drops
# Fix 1: Azure App registration
# Settings → General Settings → Integrations
# Microsoft Outlook section:
# - Client ID from Azure App
# - Client Secret (check expiry!)
# - Redirect URI: https://yourdomain.com/microsoft_account/authentication
# Fix 2: Secret expiration
# Azure secrets expire (1-2 years default)
# Generate new secret in Azure Portal:
# App Registrations → Your App → Certificates & Secrets
# Update in Odoo Settings
# Fix 3: API permissions
# Required Azure API permissions:
# - Calendars.ReadWrite
# - User.Read
# - offline_access
# Must have admin consent grantedDuplicate Events
# Problem: Same event appears multiple times
# Cause 1: Multiple users syncing same calendar
# Each user's sync creates a separate copy
# Fix: Only sync personal calendars, not shared
# Cause 2: Sync interrupted and retried
# Fix: Stop sync, delete duplicates, restart
# SQL to find duplicates:
# SELECT name, start, COUNT(*) FROM calendar_event
# GROUP BY name, start HAVING COUNT(*) > 1;
# Cause 3: Recurring event expansion
# Google/Outlook expand recurrence differently
# Fix: Edit recurring series, not individual occurrences
# Prevention:
# Set sync direction preference:
# Odoo → Google (one-way) vs bidirectional
# One-way reduces duplicate riskTimezone Mismatches
# Problem: Events appear at wrong time after sync
# Fix 1: Set user timezone correctly
# Preferences → Timezone
# Must match Google/Outlook timezone
# Fix 2: System timezone
# Odoo server timezone should be UTC
# User timezone handles display conversion
# Fix 3: All-day events
# All-day events in Google = date only (no time)
# Odoo converts using user timezone
# May shift by a day depending on timezone
# Verify: all-day events show on correct date
# Debug timezone issues:
# Check calendar.event start/stop in database
# All stored in UTC, displayed in user TZSync Cron Not Running
# Problem: Events sync on button click but not automatically
# Check scheduled action:
# Settings → Technical → Scheduled Actions
# Search: "Calendar"
# Actions to verify:
# - "Google Calendar Sync" (active? interval?)
# - "Microsoft Calendar Sync" (active? interval?)
# Fix: Re-enable cron
# Set interval to 15 minutes
# Set Next Execution Date to now
# Mark as Active
# Check cron logs:
# Settings → Technical → Scheduled Actions → [action] → Logs
# Look for error messagesConnection Reset
# Nuclear option: Reset calendar sync completely
# 1. Disconnect all users from Google/Outlook
# 2. Clear sync tokens:
UPDATE res_users SET
google_calendar_token = NULL,
google_calendar_rtoken = NULL,
google_cal_account_id = NULL;
# 3. Delete orphaned sync records
# 4. Reconfigure OAuth credentials
# 5. Each user reconnects individually
# 6. Initial sync may take time with large calendarsDeployMonkey
DeployMonkey's AI agent can help configure and troubleshoot calendar sync in your Odoo instance. Get Google and Outlook integration working reliably.