Synkronisera Google-kalender med Odoo

Synkronisera Google Kalender med Odoo för att se och hantera möten från båda plattformarna (uppdateringar går i båda riktningarna). Denna integration hjälper till att organisera scheman, så att ett möte aldrig missas.

Se även

Inställning i Google

Välj (eller skapa) ett projekt

Skapa ett nytt Google API-projekt och aktivera Google Kalender API. Gå först till Google API Console och logga in på Google-kontot.

Observera

Om det är första gången du besöker den här sidan kommer Google att uppmana användaren att ange ett land och godkänna användarvillkoren. Välj ett land i rullgardinsmenyn och godkänn ToS.

Klicka sedan på Välj ett projekt och välj (eller skapa) ett API-projekt för att konfigurera OAuth i och lagra autentiseringsuppgifter. Klicka på Nytt projekt.

Skapa ett nytt API-projekt för att lagra autentiseringsuppgifter.

Tips

Ge API-projektet ett tydligt namn, som ”Odoo Sync”, så att det lätt kan identifieras.

Aktivera API för Googles kalender

Klicka nu på Enabled APIs and Services i den vänstra menyn. Välj Enabled APIs and Services igen om Sökfältet inte visas.

Aktivera API:er och tjänster i API-projektet.

Sök sedan efter Google Calendar API med hjälp av sökfältet och välj Google Calendar API från sökresultaten. Klicka på Enable.

Aktivera Google Kalender API.

Skapa autentiseringsuppgifter

Klient-ID och Klienthemlighet behövs båda för att ansluta Google Kalender till Odoo. Detta är det sista steget i Google-konsolen. Börja med att klicka på Credentials i den vänstra menyn. Klicka sedan på Create Credentials, och välj OAuth client ID, Google kommer att öppna en guide för att skapa referenser.

Under Create OAuth Client ID, välj Website application för Application Type fältet, och skriv My Odoo Database för Name.

  • Under avsnittet Authorized JavaScript Origins klickar du på + Add URI och skriver företagets fullständiga Odoo-adress URL.

  • Under avsnittet Authorized redirect URIs klickar du på + Add URI och skriver företagets Odoo URL adress följt av /google_account/authentication. Klicka slutligen på Create.

Lägg till de auktoriserade JavaScript-ursprungen och de auktoriserade omdirigerings-URI:erna.

En Client ID och Client Secret kommer att visas, kopiera dessa till ett anteckningsblock.

Installation i Odoo

När Klient-ID och Klienthemlighet har hittats öppnar du Odoo-databasen och går till Inställningar ‣ Allmänna inställningar ‣ Integrationer ‣ Google Kalender. Markera rutan bredvid Google Calendar.

Kryssrutan Google Kalender i Allmänna inställningar.

Kopiera och klistra sedan in Klient-ID och Klienthemlighet från sidan med autentiseringsuppgifter för Google Calendar API i respektive fält under kryssrutan Google Calendar. Klicka sedan på Spara.

Synkronisera kalender i Odoo

Slutligen öppnar du appen Calendar i Odoo och klickar på synkroniseringsknappen Google för att synkronisera Google Kalender med Odoo.

Klicka på Google-synkroniseringsknappen i Odoo-kalendern för att synkronisera Google Kalender med Odoo.

Observera

När du synkroniserar Google Kalender med Odoo för första gången kommer sidan att omdirigera till Google-kontot. Välj sedan det E-postkonto som ska ha åtkomst, välj sedan Continue (om appen inte är verifierad) och välj slutligen Continue (för att ge tillstånd för överföring av data)`.

Ge Odoo behörighet att komma åt Google Kalender.

Nu är Odoo-kalendern framgångsrikt synkroniserad med Google Kalender!

Varning

Odoo rekommenderar starkt att man testar synkroniseringen av Google-kalendern på en testdatabas och en test-e-postadress (som inte används för något annat ändamål) innan man försöker synkronisera den önskade Google-kalendern med användarens produktionsdatabas.

När en användare synkroniserar sin Google-kalender med Odoo-kalendern:

  • När du skapar ett evenemang i Odoo skickar Google en inbjudan till alla deltagare i evenemanget.

  • Om du tar bort ett evenemang i Odoo skickar Google en avbokning till alla deltagare i evenemanget.

  • Om du lägger till en kontakt i ett evenemang skickar Google en inbjudan till alla deltagare i evenemanget.

  • Om du tar bort en kontakt från ett evenemang skickar Google en avbokning till alla deltagare i evenemanget.

Events can be created in Google Calendar without sending a notification by selecting Don’t Send when prompted to send invitation emails.

Troubleshoot sync

There may be times when the Google 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 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 Google calendar sync with Odoo:

Google calendar reset options in Odoo.

User’s Existing Events:

  • Leave them untouched: no changes to the events.

  • Delete from the current Google Calendar account: delete the events from Google Calendar.

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

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

Next Synchronization:

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

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

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

Vanliga frågor om Google OAuth

At times there can be misconfigurations that take place, and troubleshooting is needed to resolve the issue. Below are the most common errors that may occur when configuring the Google Calendar for use with Odoo.

Production vs. testing publishing status

Choosing Production as the Publishing Status (instead of Testing) displays the following warning message:

OAuth is limited to 100 sensitive scope logins until the OAuth consent screen is verified. This may require a verification process that can take several days.

To correct this warning, navigate to the Google API Platform. If the Publishing Status is In Production, click Back to Testing to correct the issue.

No test users added

If no test users are added to the OAuth consent screen, then an Error 403: access_denied populates.

403 Åtkomst nekad Fel.

To correct this error, return to the OAuth consent screen, under APIs & Services, and add test users to the app. Add the email to be configured in Odoo.

Typ av tillämpning

When creating the credentials (OAuth Client ID and Client Secret), if Desktop App is selected for the Application Type, an Authorization Error appears (Error 400:redirect_uri_mismatch).

Fel 400 Redirect URI Mismatch.

To correct this error, delete the existing credentials, and create new credentials, by selecting Web Application for the Application Type.

Then, under Authorized redirect URIs, click ADD URI, and type: https://yourdbname.odoo.com/google_account/authentication in the field, being sure to replace yourdbname in the URL with the real Odoo database name.

Tips

Ensure that the domain (used in the URI: https://yourdbname.odoo.com/google_account/authentication) is the exact same domain as configured in 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.