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
/applikationer/generellt/användare/google
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.
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.
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.
Skärmen för OAuth-medgivande¶
Nu när API-projektet har skapats bör OAuth konfigureras. Det gör du genom att klicka på OAuth consent i menyn till vänster och sedan välja User Type.
Varning
Personliga Gmail-konton får endast vara Extern användartyp, vilket innebär att Google kan kräva ett godkännande eller att Scopes läggs till. Om du använder ett Google WorkSpace-konto kan du dock använda Intern användartyp.
Observera också att när API-anslutningen är i testläget External krävs inget godkännande från Google. Användargränserna i detta testläge är inställda på 100 användare.
I det andra steget, OAuth Consent Screen, skriver du Odoo
i fältet App name, väljer e-postadressen för fältet User support email och skriver e-postadressen för avsnittet Developer contact information. Klicka sedan på Spara och fortsätt.
Hoppa över det tredje steget, Save and Continue.
, genom att klicka påOm du fortsätter i testläge (Extern) lägger du till de e-postadresser som konfigurerats under steget Test users genom att klicka på Add Users och sedan på knappen Save and Continue. En sammanfattning av appregistreringen visas.
Scrolla sedan längst ner och klicka på Back to Dashboard.
Nu har OAuth-medgivandet konfigurerats och det är dags att skapa autentiseringsuppgifter.
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 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.
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 Google Calendar.
. Markera rutan bredvidKopiera 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 Google för att synkronisera Google Kalender med Odoo.
i Odoo och klickar på synkroniseringsknappenObservera
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)`.
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 . Then, select the user to modify the calendar, and click the Calendar tab.
Next, click Reset Account under the correct calendar.
Reset options¶
The following reset options are available for troubleshooting Google calendar sync with 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.
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).
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
.