Sincronização do Calendário do Outlook

Synchronizing a user’s Outlook Calendar with Odoo is useful for keeping track of tasks and appointments across all related applications.

Microsoft Azure setup

To sync the Outlook Calendar with Odoo’s Calendar, a Microsoft Azure account is required. Creating an account is free for users who have never tried, or paid for, Azure. For more information, view the account options on the Azure website.

Refer to Microsoft’s documentation on how to set up a Microsoft Entra ID (formally called Microsoft Azure Active Directory (Azure AD)). This is an API console to manage and register Microsoft applications.

Existing Microsoft Entra ID users should log in at the Microsoft Azure developer portal. Next, select View under the section labeled Manage Microsoft Entra ID.

Register application

After logging in with the Microsoft Entra ID, register an application.

To create an application, click + Add in the top menu. From the resulting drop-down menu, select App Registration.

Microsoft Azure management page with + Add and App Registration menu highlighted.

Enter a unique Name for the connected application.

Choosing the appropriate Supported account type is essential, or else the connected application will not work. Users who wish to connect their Outlook Calendar to Odoo should select the Accounts in any organizational directory (Any Microsoft Entra ID directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox) option for Supported account types.

When configuring the Redirect URI, choose the Web option from the first drop-down menu. Then, enter the Odoo database URI (URL) followed by /microsoft_account/authentication.

Example

Enter https://yourdbname.odoo.com/microsoft_account/authentication for the Redirect URI. Replace yourdbname.odoo.com with the URL.

Dica

Ensure the database’s URL (domain) used in the URI is the exact same domain as the one configured on the web.base.url system parameter.

Access the web.base.url by activating developer mode, and navigating to Settings app ‣ Technical header menu ‣ Parameters section ‣ System Parameters. Then, select it from the Key list on the System Parameters page.

As configurações "Tipo de conta compatível" e "URI de redirecionamento" no portal Microsoft Entra ID.

For more information on the restrictions and limitations of URIs, check Microsoft’s Redirect URI (reply URL) restrictions and limitations page.

Finally, on the application registration page, click Register button to complete the application registration. The Application (client) ID is produced. Copy this value, as it is needed later, in the Configuração no Odoo.

Application client ID highlighted in the essentials section of the newly created application.

Create client secret

The second credential needed to complete the synchronization of the Microsoft Outlook Calendar is the Client Secret. The user must add a client secret, as this allows Odoo to authenticate itself, requiring no interaction from the user’s side. Certificates are optional.

To add a client secret, click Certificates & secrets in the left menu. Then click + New client secret to create the client secret.

New client secret page with certificates and secrets menu and new client secret option highlighted.

Next, type a Description, and select when the client secret Expires. Available options include: 90 days (3 months), 365 days (12 months), 545 days (18 months), 730 days (24 months) or Custom. The Custom option allows the administrator to set a Start and End date.

Finally, click Add to Add a client secret.

Dica

Since resetting the synchronization can be tricky, Odoo recommends setting the maximum allowed expiration date for the client secret (24 months or custom), so there is no need to re-synchronize soon.

Copy the Value for use in the next section.

Aviso

Client secret values cannot be viewed, except immediately after creation. Be sure to save the secret when created before leaving the page.

Configuração no Odoo

In the Odoo database, go to Settings app ‣ Integrations section, and tick the checkbox beside the Outlook Calendar setting. Remember to click Save to implement the changes.

A configuração "Calendário do Outlook" ativada no Odoo.

From the Microsoft Azure portal, under the Overview section of the application, copy the Application (Client) ID, if it has not already been copied, and paste it into the Client ID field in Odoo.

O "ID do cliente" no portal do Microsoft Azure.

Copy the previously-acquired Value (Client Secret Value), and paste it into the Client Secret field in Odoo.

O token "Segredo do cliente" a copiar da Microsoft para o Odoo.

Por fim, na página Definições ‣ Configurações gerais do Odoo, clique em Salvar.

Sincronizar com Outlook

Aviso

A Odoo recomenda fortemente testar a sincronização do calendário do Outlook em uma base de dados de teste com um endereço de e-mail de teste (que não seja usado para nenhuma outra finalidade) antes de tentar sincronizar o calendário do Outlook desejado com a base de dados de produção do usuário.

Se o usuário tiver algum evento passado, presente ou futuro em seu calendário do Odoo antes de sincronizar seu calendário do Outlook, o Outlook tratará os eventos extraídos do calendário do Odoo durante a sincronização como novos eventos, fazendo com que uma notificação por e-mail seja enviada do Outlook para todos os participantes do evento.

Para evitar que e-mails indesejados sejam enviados a todos os participantes de eventos passados, presentes e futuros, o usuário deve adicionar os eventos do calendário do Odoo ao calendário do Outlook antes da primeira sincronização, excluir os eventos do Odoo e, em seguida, iniciar a sincronização.

Mesmo depois de sincronizar o calendário do Odoo com o calendário do Outlook, o Outlook ainda enviará uma notificação a todos os participantes do evento toda vez que um evento for editado (criado, excluído, desarquivado ou data/hora do evento alterada), sem exceções. Essa é uma limitação que não pode ser corrigida pelo Odoo.

Em resumo, quando um usuário sincroniza seu calendário do Outlook com o calendário do Odoo:

  • A criação de um evento no Odoo faz com que o Outlook envie um convite a todos os participantes do evento.

  • A exclusão de um evento no Odoo faz com que o Outlook envie um cancelamento a todos os participantes do evento.

  • O desarquivamento de um evento no Odoo faz com que o Outlook envie um convite a todos os participantes do evento.

  • O arquivamento de um evento no Odoo faz com que o Outlook envie um cancelamento a todos os participantes do evento.

  • A adição de um contato a um evento faz com que o Outlook envie um convite a todos os participantes do evento.

  • A remoção de um contato de um evento faz com que o Outlook envie um cancelamento a todos os participantes do evento.

Sincronizar o Calendário do Odoo com o Outlook

In the Odoo database, open to the Calendar module, and click the Outlook sync button on the right-side of the page, beneath the monthly calendar.

O botão de sincronização do "Outlook" no Calendário do Odoo.

The synchronization is a two-way process, meaning that events are reconciled in both accounts (Outlook and Odoo). The page redirects to a Microsoft login page, and the user is asked to log in to their account, if they are not already. Finally, grant the required permissions by clicking Accept.

Authentication process on Microsoft Outlook OAuth page.

Nota

All users that want to use the synchronization simply need to sync their calendar with Outlook. The configuration of Microsoft’s Azure account is only done once, as Microsoft Entra ID tenants’ client IDs and client secrets are unique, and help the user manage a specific instance of Microsoft cloud services for internal and external users.

Troubleshoot sync

There may be times when the Microsoft Outlook Calendar account does not sync correctly with Odoo. Sync issues can be seen in the database logs.

In these cases, the account needs troubleshooting. A reset can be performed using the Reset Account button, which can be accessed by navigating to Settings app ‣ Manage Users. Then, select the user to modify the calendar, and click on the Calendar tab.

Reset buttons highlighted on the calendar tab of the user.

Next, click Reset Account under the correct calendar.

Reset options

The following reset options are available for troubleshooting Microsoft Outlook Calendar sync with Odoo:

Outlook calendar reset options in Odoo.

User’s Existing Events:

  • Leave them untouched: no changes to the events.

  • Delete from the current Microsoft Calendar account: delete the events from Microsoft Outlook Calendar.

  • Delete from Odoo: delete the events from the Odoo calendar.

  • Delete from both: delete the events from both Microsoft Outlook Calendar and Odoo calendar.

Next Synchronization:

  • Synchronize only new events: sync new events on Microsoft Outlook Calendar and/or Odoo calendar.

  • Synchronize all existing events: sync all events on Microsoft Outlook Calendar and/or Odoo calendar.

Click Confirm after making the selection to modify the user’s events and the calendar synchronization.