Microsoft account for Drive

microsoft_drive_account
REPOSITORY
REPOSITORYOCA/storage
GIT
GIThttps://github.com/OCA/storage.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/storage/tree/19.0/microsoft_drive_account
VERSION
VERSION 2.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSStéphane Bidoul, Laurent Mignon (ACSONE), OCA-git-bot, Nithwith
WEBSITE
WEBSITEhttps://github.com/OCA/storage
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:40:49
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - microsoft_account
    - base_setup
    - base
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This addon allows the user to link their Microsoft Drive account to Odoo. The stored credentials are then used by other addons to perform actions on Drive as the logged-in user.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
microsoft_drive_reset_account_form_view microsoft.drive.account.reset.form.view microsoft.drive.account.reset form New
res_users_form_view res.users.from.view res.users page Inherits base.view_users_form
res_users_simple_form_view res.users.from.view res.users group Inherits base.view_users_form_simple_modif
Models touched (4)

New fields (1)
  • user_id Many2one → res.users
    required=True args: 'res.users'
Public methods (1)
  • reset_account(self)

New fields (0)

No new fields.

Public methods (1)
  • generate_refresh_token(self, service, authorization_code)
    @api.model

New fields (3)
  • drive_microsoft_client_id Char
    config_parameter='microsoft_drive_client_id' default='' args: 'Microsoft Drive Client_id'
  • drive_microsoft_client_scope Char
    config_parameter='microsoft_drive_client_scope' default='' args: 'Microsoft Drive Scope'
  • drive_microsoft_client_secret Char
    config_parameter='microsoft_drive_client_secret' default='' args: 'Microsoft Drive Client_key'
Public methods (0)

No public methods.

New fields (5)
  • microsoft_drive_oauth2_non_interactive Boolean
    default=False help="If set, this user will not go through the interactive OAuth2 authorization flow; The requested token will be requested to the authentication server directly using client credentials flows. (scope: 'https://graph.microsoft.com/.default', grante_type: 'client_credentials')" string='Microsoft Drive OAuth2 (non-interactive)'
  • microsoft_drive_rtoken Char
    copy=False groups='base.group_system' args: 'Microsoft Drive Refresh Token'
  • microsoft_drive_status Selection
    compute='_compute_microsoft_drive_status' copy=False default='not_connected' store=True args: [('not_connected', 'Not connected'), ('connected', 'Connected')], 'Microsoft Drive Connection Status'
  • microsoft_drive_token Char
    copy=False groups='base.group_system'
  • microsoft_drive_token_validity Datetime
    copy=False
Public methods (3)
  • SELF_READABLE_FIELDS(self)
    @property
    Extend the set of user fields that are allowed in sudo mode when a user reads their own profile. The check is all-or-nothing: if any requested field is not in this list, sudo is not applied and restricted fields will raise access errors.
  • action_drive_disconnect(self)
    Disconnect the user from Drive.
  • get_drive_authentication_url(self, from_url: str) -> str
REPOSITORY
REPOSITORYOCA/storage
GIT
GIThttps://github.com/OCA/storage.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/storage/tree/18.0/microsoft_drive_account
VERSION
VERSION 2.0.1
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSLaurent Mignon (ACSONE), Weblate, OCA-git-bot, oca-ci, Pierre Halleux
WEBSITE
WEBSITEhttps://github.com/OCA/storage
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:15
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - microsoft_account
    - base_setup
    - base
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This addon allows the user to link their Microsoft Drive account to Odoo. The stored credentials are then used by other addons to perform actions on Drive as the logged-in user.

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
microsoft_drive_reset_account_form_view microsoft.drive.account.reset.form.view microsoft.drive.account.reset form New
res_users_form_view res.users.from.view res.users page Inherits base.view_users_form
res_users_simple_form_view res.users.from.view res.users group Inherits base.view_users_form_simple_modif
Models touched (4)

New fields (1)
  • user_id Many2one → res.users
    required=True args: 'res.users'
Public methods (1)
  • reset_account(self)

New fields (0)

No new fields.

Public methods (1)
  • generate_refresh_token(self, service, authorization_code)
    @api.model

New fields (3)
  • drive_microsoft_client_id Char
    config_parameter='microsoft_drive_client_id' default='' args: 'Microsoft Drive Client_id'
  • drive_microsoft_client_scope Char
    config_parameter='microsoft_drive_client_scope' default='' args: 'Microsoft Drive Scope'
  • drive_microsoft_client_secret Char
    config_parameter='microsoft_drive_client_secret' default='' args: 'Microsoft Drive Client_key'
Public methods (0)

No public methods.

New fields (5)
  • microsoft_drive_oauth2_non_interactive Boolean
    default=False help="If set, this user will not go through the interactive OAuth2 authorization flow; The requested token will be requested to the authentication server directly using client credentials flows. (scope: 'https://graph.microsoft.com/.default', grante_type: 'client_credentials')" string='Microsoft Drive OAuth2 (non-interactive)'
  • microsoft_drive_rtoken Char
    copy=False groups='base.group_system' args: 'Microsoft Drive Refresh Token'
  • microsoft_drive_status Selection
    compute='_compute_microsoft_drive_status' copy=False default='not_connected' store=True args: [('not_connected', 'Not connected'), ('connected', 'Connected')], 'Microsoft Drive Connection Status'
  • microsoft_drive_token Char
    copy=False groups='base.group_system'
  • microsoft_drive_token_validity Datetime
    copy=False
Public methods (3)
  • SELF_READABLE_FIELDS(self)
    @property
    Extend the set of user fields that are allowed in sudo mode when a user reads their own profile. The check is all-or-nothing: if any requested field is not in this list, sudo is not applied and restricted fields will raise access errors.
  • action_drive_disconnect(self)
    Disconnect the user from Drive.
  • get_drive_authentication_url(self, from_url: str) -> str