Attachment Control for Odoo - OneDrive Connector

https://spre.es/web/image/product.template/74/image_1920?unique=2e44884

59.00 € 59.0 EUR 59.00 € VAT Excluded

Not Available For Sale

  • Version

This combination does not exist.

OneDrive connector for Attachment Control

Attachment Control - OneDrive

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

OneDrive Microsoft 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

  • OneDrive provider in Storage Credentials: create credentials for Microsoft OneDrive 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: Microsoft-specific OAuth and Graph API logic stays outside the core module.
Opt-in only: installing this connector does not send data to OneDrive by itself. External communication only starts after the user creates and validates a OneDrive 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 Microsoft APIs explicitly configured by the user.

Compatibility

  • On-premise: supported.
  • Odoo.sh: supported if outbound HTTPS access to Microsoft login and Graph 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 Microsoft OAuth, token refresh and Graph 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_onedrive.
  4. Configure Microsoft application registration and the exact callback URL used by Odoo.

Microsoft OAuth setup

Get Microsoft app credentials: open https://entra.microsoft.com and go to App registrations.
1. In Microsoft Entra / Azure App Registration, create an application registration.
2. Add a Web redirect URI with this exact callback:
https://your-odoo.example.com/attachment_storage_manager_onedrive/oauth/callback
3. Create a Client Secret and copy its value, not its secret ID.
4. Use the correct supported account types according to your use case. Personal accounts and work/school accounts do not always use the same tenant endpoint.
5. The connector can work with both personal and work/school accounts. If the app is registered only for personal accounts, the connector can fall back from common to consumers automatically during authorization.
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 Microsoft application (client) ID.
Secret Key / Client Secret: the value of the client secret created in Microsoft Entra, not the secret identifier.
API Token: used as the OAuth Refresh Token. Leave it empty the first time; it is stored automatically after a successful OAuth authorization flow.
Container / Bucket: optional OneDrive Drive ID. Leave empty to use me/drive.
Path Prefix: optional folder path created/used under the selected drive.
Endpoint URL: optional advanced Graph API base override. Leave empty in normal setups.
Extra Parameters (JSON): optional advanced settings such as custom base URLs, timeout values or a fixed tenant.
Free accounts and normal usage: do not use Container / Bucket as a folder name. In OneDrive this field is an advanced Drive ID. For personal accounts and normal setups, leave it empty and use Path Prefix for the folder path.
{
  "tenant": "common",
  "timeout": 30
}
Important: if you use a personal Microsoft account and the application is registered only for consumer accounts, the connector may need consumers instead of common.

How it is used

1. Create a OneDrive 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 Microsoft 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 Microsoft does not return a refresh token, re-consent may be required.
  • If authorization fails with an audience or tenant mismatch, review the supported account types in Microsoft Entra and the configured tenant in the credential.
  • 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 OneDrive para Attachment Control

Attachment Control - OneDrive

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

OneDrive Microsoft 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 OneDrive en Storage Credentials: crea credenciales para Microsoft OneDrive 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 Microsoft OAuth y Graph API permanece fuera del módulo core.
Solo mediante opt-in: instalar este conector no envía datos a OneDrive por sí mismo. La comunicación externa solo empieza después de que el usuario cree y valide una credencial OneDrive 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 Microsoft configuradas explícitamente por el usuario.

Compatibilidad

  • On-premise: soportado.
  • Odoo.sh: soportado si el acceso HTTPS saliente a Microsoft login y Graph APIs 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 Microsoft OAuth, la renovación de tokens y las operaciones sobre Microsoft Graph.

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_onedrive.
  4. Configura el registro de aplicación de Microsoft y la URL exacta de callback usada por Odoo.

Configuración de Microsoft OAuth

Obtener credenciales de app de Microsoft: abre https://entra.microsoft.com y entra en App registrations.
1. En Microsoft Entra / Azure App Registration, crea un registro de aplicación.
2. Añade una URI de redirección de tipo Web con este callback exacto:
https://your-odoo.example.com/attachment_storage_manager_onedrive/oauth/callback
3. Crea un Client Secret y copia su valor, no su identificador de secreto.
4. Usa los tipos de cuenta soportados correctos según tu caso. Las cuentas personales y las cuentas work/school no siempre usan el mismo tenant endpoint.
5. El conector puede trabajar tanto con cuentas personales como con cuentas work/school. Si la aplicación está registrada solo para cuentas personales, el conector puede hacer fallback automático de common a consumers durante la autorización.
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 identificador de aplicación (client) de Microsoft.
Secret Key / Client Secret: el valor del client secret creado en Microsoft Entra, no el identificador del secreto.
API Token: se usa como Refresh Token OAuth. Déjalo vacío la primera vez; se guarda automáticamente tras una autorización correcta.
Container / Bucket: Drive ID opcional de OneDrive. Déjalo vacío para usar me/drive.
Path Prefix: ruta opcional de carpetas creada/usada bajo el drive seleccionado.
Endpoint URL: override avanzado opcional de la base Graph API. Déjalo vacío en configuraciones normales.
Extra Parameters (JSON): ajustes avanzados opcionales como URLs base personalizadas, valores de timeout o un tenant fijo.
Cuentas gratuitas y uso normal: no uses Container / Bucket como nombre de carpeta. En OneDrive este campo es un Drive ID avanzado. Para cuentas personales y configuraciones normales, déjalo vacío y usa Path Prefix para la ruta de carpetas.
{
  "tenant": "common",
  "timeout": 30
}
Importante: si usas una cuenta personal de Microsoft y la aplicación está registrada solo para cuentas consumer, el conector puede necesitar consumers en lugar de common.

Cómo se utiliza

1. Crea una credencial OneDrive 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 Microsoft 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 Microsoft no devuelve un refresh token, puede ser necesario volver a conceder consentimiento.
  • Si la autorización falla por un problema de audiencia o tenant, revisa los tipos de cuenta soportados en Microsoft Entra y el tenant configurado en la credencial.
  • 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.