Attachment Control for Odoo - Google Drive Connector

https://spre.es/web/image/product.template/73/image_1920?unique=bae2975

59.00 € 59.0 EUR 59.00 € VAT Excluded

Not Available For Sale

  • Version

This combination does not exist.

Google Drive connector for Attachment Control

Attachment Control - Google Drive

Add Google Drive as a storage backend for Attachment Control so routing, audit, move, storage archive and restore workflows can work with Google Drive through OAuth-based credentials.

Google Drive OAuth 2.0 Routing, Move, Storage, Restore Optional Connector Add-on
Availability: Odoo Online: not recommended | Odoo.sh: generally supported | On Premise: supported
Support: info@spre.es

What this connector adds

  • Google Drive provider in Storage Credentials: create credentials for Google Drive through OAuth 2.0.
  • Credential-based backend usage: the core module can use this provider in routing, move, storage archive and restore flows.
  • Generic backend operations: read, write, delete, list and connection test through the common backend API.
  • Provider isolation: Google-specific OAuth and API logic stays outside the core module.
Opt-in only: installing this connector does not send data to Google Drive by itself. External communication only starts after the user creates and validates a Google Drive credential and explicitly selects it in the corresponding configuration or workflow.
Data sent only after opt-in: attachment binary content, remote path/folder information, and the technical metadata needed by the selected workflow, such as filename, mimetype, file size or checksum when available.
No data is sent to the developer. Data is sent only to the Google APIs explicitly configured by the user.

Compatibility

  • On-premise: supported.
  • Odoo.sh: supported if outbound HTTPS access to Google APIs is allowed.
  • Odoo Online: not supported for this connector because custom module code and callback routing are outside normal Odoo Online constraints.
Why a separate add-on? The core module remains provider-agnostic and only this connector knows how to handle Google OAuth, token refresh and Drive API operations.

Requirements

  1. Install the core module Attachment Control.
  2. Ensure the Python dependency requests is available in the same Python environment used by Odoo.
  3. Install this connector module attachment_storage_manager_gdrive.
  4. Configure Google Cloud OAuth credentials and the exact callback URL used by Odoo.

Google OAuth setup

1. In Google Cloud, enable the Google Drive API.
2. Create an OAuth client with type Web application.
3. Add your public Odoo URL as an authorized origin, for example https://your-odoo.example.com.
4. Add this exact redirect URI:
https://your-odoo.example.com/attachment_storage_manager_gdrive/oauth/callback
5. In Google OAuth consent screen, use the correct audience. If the app is Internal, only users of that Google Workspace organization can authorize it. For personal Gmail or external users, the app must be External.
Important: the redirect URI must match the effective web.base.url of Odoo exactly, including scheme and domain.

Credential fields

Access Key / Client ID: the full Google OAuth Client ID. It must end with .apps.googleusercontent.com.
Secret Key / Client Secret: the secret generated for that same OAuth client.
API Token: used as the Google OAuth Refresh Token. Leave it empty the first time; it is stored automatically after a successful OAuth authorization flow.
Container / Bucket: optional Google Drive root folder ID. Leave empty to use Drive root.
Path Prefix: optional folder path created/used under the selected root.
Endpoint URL: optional advanced API base override. Leave empty in normal setups.
Extra Parameters (JSON): optional advanced settings such as custom API URLs or timeout values.
Free accounts and normal usage: do not use Container / Bucket as a folder name. In Google Drive this field is an advanced root folder ID. For free accounts and normal setups, leave it empty and use Path Prefix for the folder path.
{
  "timeout": 30
}
Important: do not use a Google API key, project number or project ID as Client ID. Use the full OAuth Client ID and Client Secret from Google Cloud.

How it is used

1. Create a Google Drive credential in Storage Credentials.
2. Fill Client ID and Client Secret. Leave API Token empty for the first authorization.
3. Click Test Connection. Odoo opens the Google OAuth flow in a new window.
4. Approve access. Odoo stores the refresh token automatically and validates the credential.
5. Select that credential in the corresponding routing or storage configuration of the core module.
6. Use audit, move, storage and restore workflows from the core module as usual; this connector only provides the backend integration.

Operational notes

  • web.base.url must match your public HTTPS URL.
  • Behind a reverse proxy, enable proxy_mode = True and pass the correct HTTPS scheme to Odoo.
  • If Google does not return a refresh token, revoke app access and authorize again.
  • If authorization fails with an audience restriction such as org_internal, review whether the OAuth consent screen is configured as Internal or External.
  • For long-running jobs, configure limit_time_real_cron = 3600 in odoo.conf.

Operational safety

Important: we recommend carrying out all tests beforehand in a test database and making a complete backup before any intervention. We do not assume responsibility for possible incidents, misuse or data loss that may occur during its use.
Conector de Google Drive para Attachment Control

Attachment Control - Google Drive

Añade Google Drive como backend de almacenamiento para Attachment Control para que los flujos de routing, audit, move, storage archive y restore puedan trabajar con Google Drive mediante credenciales basadas en OAuth.

Google Drive OAuth 2.0 Routing, Move, Storage, Restore Conector opcional
Disponibilidad: Odoo Online: no recomendado | Odoo.sh: generalmente soportado | On Premise: soportado
Soporte: info@spre.es

Qué añade este conector

  • Proveedor Google Drive en Storage Credentials: crea credenciales para Google Drive mediante OAuth 2.0.
  • Uso de backend basado en credenciales: el módulo core puede usar este proveedor en los flujos de routing, move, storage archive y restore.
  • Operaciones backend genéricas: lectura, escritura, borrado, listado y prueba de conexión mediante la API backend común.
  • Aislamiento del proveedor: la lógica específica de OAuth y API de Google permanece fuera del módulo core.
Solo mediante opt-in: instalar este conector no envía datos a Google Drive por sí mismo. La comunicación externa solo empieza después de que el usuario cree y valide una credencial Google Drive y la seleccione explícitamente en la configuración o flujo correspondiente.
Los datos solo se envían tras el opt-in: contenido binario del adjunto, información de ruta o carpeta remota y los metadatos técnicos necesarios para el flujo seleccionado, como nombre de archivo, mimetype, tamaño del archivo o checksum cuando esté disponible.
No se envía ningún dato al desarrollador. Los datos se envían únicamente a las APIs de Google configuradas explícitamente por el usuario.

Compatibilidad

  • On-premise: soportado.
  • Odoo.sh: soportado si el acceso HTTPS saliente a las APIs de Google está permitido.
  • Odoo Online: no soportado para este conector porque el código del módulo personalizado y el callback quedan fuera de las restricciones normales de Odoo Online.
¿Por qué es un add-on separado? El módulo core sigue siendo agnóstico respecto al proveedor y solo este conector sabe gestionar Google OAuth, la renovación de tokens y las operaciones sobre la API de Drive.

Requisitos

  1. Instala el módulo core Attachment Control.
  2. Asegúrate de que la dependencia Python requests está disponible en el mismo entorno Python usado por Odoo.
  3. Instala este módulo conector attachment_storage_manager_gdrive.
  4. Configura las credenciales OAuth de Google Cloud y la URL exacta de callback usada por Odoo.

Configuración de Google OAuth

1. En Google Cloud, habilita la API de Google Drive.
2. Crea un cliente OAuth de tipo Aplicación web.
3. Añade tu URL pública de Odoo como origen autorizado, por ejemplo https://your-odoo.example.com.
4. Añade esta URI de redirección exacta:
https://your-odoo.example.com/attachment_storage_manager_gdrive/oauth/callback
5. En la pantalla de consentimiento OAuth de Google, usa la audiencia correcta. Si la app es Internal, solo los usuarios de esa organización Google Workspace podrán autorizarla. Para cuentas Gmail personales o usuarios externos, la app debe ser External.
Importante: la URI de redirección debe coincidir exactamente con el web.base.url efectivo de Odoo, incluyendo esquema y dominio.

Campos de la credencial

Access Key / Client ID: el Client ID completo de Google OAuth. Debe terminar en .apps.googleusercontent.com.
Secret Key / Client Secret: el secreto generado para ese mismo cliente OAuth.
API Token: se usa como Refresh Token de Google OAuth. Déjalo vacío la primera vez; se guarda automáticamente tras una autorización correcta.
Container / Bucket: ID opcional de carpeta raíz de Google Drive. Déjalo vacío para usar la raíz de Drive.
Path Prefix: ruta opcional de carpetas creada/usada bajo la raíz seleccionada.
Endpoint URL: override avanzado opcional de la base API. Déjalo vacío en configuraciones normales.
Extra Parameters (JSON): ajustes avanzados opcionales como URLs API personalizadas o valores de timeout.
Cuentas gratuitas y uso normal: no uses Container / Bucket como nombre de carpeta. En Google Drive este campo es un root folder ID avanzado. Para cuentas gratuitas y configuraciones normales, déjalo vacío y usa Path Prefix para la ruta de carpetas.
{
  "timeout": 30
}
Importante: no uses una Google API key, project number o project ID como Client ID. Usa el Client ID y Client Secret completos desde Google Cloud.

Cómo se utiliza

1. Crea una credencial Google Drive en Storage Credentials.
2. Rellena Client ID y Client Secret. Deja API Token vacío en la primera autorización.
3. Pulsa Test Connection. Odoo abre el flujo OAuth de Google en una nueva ventana.
4. Aprueba el acceso. Odoo guarda automáticamente el refresh token y valida la credencial.
5. Selecciona esa credencial en la configuración de routing o storage correspondiente del módulo core.
6. Usa los flujos de audit, move, storage y restore del módulo core como de costumbre; este conector solo aporta la integración backend.

Notas operativas

  • web.base.url debe coincidir con tu URL pública HTTPS.
  • Detrás de un proxy inverso, activa proxy_mode = True y pasa correctamente el esquema HTTPS a Odoo.
  • Si Google no devuelve un refresh token, revoca el acceso de la app y autoriza de nuevo.
  • Si la autorización falla con una restricción de audiencia como org_internal, revisa si la pantalla de consentimiento OAuth está configurada como Internal o External.
  • Para jobs de larga duración, configura limit_time_real_cron = 3600 en odoo.conf.

Seguridad operativa

Importante: recomendamos realizar todas las pruebas previamente en una base de test y hacer una copia de seguridad completa antes de cualquier intervención. No asumimos responsabilidad por posibles incidencias, mal uso o pérdida de datos que puedan producirse durante su utilización.