Authorization Flow
This screen shows the OAuth 2.0 authorization process. The "Authorize" button initiates the connection between Odoo and your Google account. When clicked, a popup window opens with Google's consent screen where you select your Google account and grant permission. After successful authorization, the status changes to "Authorized" and displays your connected email, token expiry date, and storage usage statistics.
File Management
This form manages individual file records for Google Drive synchronization. The "Upload to Drive" button uploads the file and the status badge shows the current state: Pending Upload, Uploading, or Synced. The File Info section displays file size, MIME type, target folder, and linked Odoo attachment. The Google Drive section shows the File ID, direct view link, and sync timestamp after upload. The Related Record section links the file to specific Odoo records like sales orders or invoices for document organization.
Upload Wizard
This wizard provides a quick way to upload files directly to Google Drive. Click "Upload your file" to select a file from your computer, optionally set a custom file name, and choose a destination folder in Google Drive. Enable "Upload Immediately" checkbox to start the upload right after clicking the Upload button. This wizard is accessible from the Cloud Storage menu for quick file uploads without creating attachment records first.
Sync Wizard
This powerful wizard handles bidirectional synchronization between Odoo and Google Drive. Choose your Sync Type: "Upload to Google Drive" to send files from Odoo, "Download from Google Drive" to import files into Odoo, or "Sync Both Ways" for complete synchronization. Select a target Folder, and use Upload Options to include pending files or retry failed uploads. The Filters section lets you narrow down files by Model name and date range. The "Files to upload" counter shows how many files match your criteria before starting the sync process.
Configuration Dashboard
The main configuration screen displays your Google Drive connection status and settings at a glance. The header shows "Files Synced" count and quick action buttons: Re-authorize, Test Connection, and Disconnect. The Google OAuth2 Credentials section stores your Client ID and Client Secret. Google Drive Settings define the Root Folder Name and ID. Sync Settings control Auto Sync toggle, Sync Interval in minutes, and Max File Size limit in MB. The Status section displays Last Sync timestamp, Storage Used in MB, and Active status. The status badge shows Not Connected, Authorized, or Connected states.
How It Works
- Create Google Cloud Project - Go to Google Cloud Console and create a new project
- Enable Drive API - Enable the Google Drive API for your project
- Create OAuth Credentials - Set up OAuth 2.0 credentials with your Odoo redirect URI
- Configure in Odoo - Enter your Client ID and Client Secret in the Cloud Storage Configuration
- Authorize - Click the Authorize button and grant access to your Google account
- Start Syncing - Upload files, create folders, and sync between Odoo and Google Drive
Security
- Uses OAuth 2.0 for authentication - no passwords are stored
- Tokens are encrypted and stored in the database, not in code
- Only authorized users can access cloud storage features
- Respects Odoo access control - admin-only configuration
Requirements
| Requirement | Details |
|---|---|
| Odoo Version | 18.0 (Community or Enterprise) |
| Google Account | Gmail or Google Workspace account |
| Google Cloud Project | With Drive API enabled and OAuth credentials |
| Python Packages |
google-api-python-clientgoogle-auth-httplib2google-auth-oauthlib
|
Installation
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib
Tips
Support
Need help with installation or configuration?
- Detailed setup instructions are included in the module configuration page
- Check the README file for troubleshooting common issues
- Open a support ticket on Odoo Apps for technical assistance
Please log in to comment on this module