همگام‌سازی تقویم گوگل

با استفاده از امکانات تعبیه شده، تقویم گوگل را با سازمان‌یار همگام کرده و جلسات را در هر دو پلتفرم مشاهده و مدیریت کنید (به‌روزرسانی دو جهته است). این ادغام در برنامه‌ریزی زمانی کمک‌کننده بوده و هیچ جلسه‌ای فراموش نمی‌شود.

انجام تنظیمات در گوگل

انتخاب (یا ایجاد) پروژه جدید

پروژه API جدیدی در گوگل ایجاد کرده و API تقویم گوگل را در آن فعال کنید. ابتدا وارد Google API Console شده و با حساب گوگل خود ورود کنید.

توجه

اگر برای اولین بار این صفحه را مشاهده می‌کنید، گوگل از کاربر درخواست می‌کند کشور را وارد کرده و شرایط و ضوابط را پذیرش کند. از لیست کشوری را انتخاب کرده و ToS را پذیرش کنید.

در ادامه، Select a project (انتخاب پروژه) را بزنید و یک پروژه API ایجاد کرده و OAuth را پیکربندی کنید. مجوزها و اطلاعات دریافتی را ذخیره و بر روی New Project (پروژه جدید) کلیک کنید.

ایجاد پروژه API جدید برای ذخیره اطلاعات.

نکته

نام مشخصی برای پروژه API وارد کنید، مانند «Odoo Sync» که به آسانی قابل شناسایی باشد.

فعال‌سازی API تقویم گوگل

حالا، در منوی چپ Enabled APIs and Services (APIها و سرویس‌های فعال) را کلیک کنید. اگر نوار جستجو نشان داده نمی‌شود، دوباره Enabled APIs and Services را بزنید.

فعال‌سازی APIها و سرویس‌ها در پروژه API.

سپس، در نوار جستجو، Google Calendar API را جستجو کرده و از نتایج جستجو Google Calendar API را انتخاب کنید. بر روی Enable (فعال‌سازی) کلیک کنید.

فعال‌سازی API تقویم گوگل.

ایجاد اطلاعات احراز

برای اتصال تقویم گوگل به سازمان‌یار، Client ID و Client Secret هر دو مورد نیاز هستند. این آخرین گام در کنسول گوگل است. ابتدا در منوی چپ Credentials و سپس Create Credentials را بزنید و OAuth client ID را انتخاب نمایید. گوگل راهنمایی برای ایجاد اطلاعات احراز نمایش خواهد داد.

در بخش Create OAuth Client ID گزینه Website application را در فیلد Application Type وارد نمایید، و در فیلد Name عبارت My Odoo Database را وارد نمایید.

  • در بخش Authorized JavaScript Origins بر روی + Add URI کلیک کرده و آدرس URL کامل اودوو را وارد کنید.

  • در بخش Authorized redirect URIs، روی + Add URI کلیک کرده و آدرس URL کامل اودوو را وارد کرده و در ادامه آن /google_account/authentication را تایپ کنید. در نهایت Create را بزنید.

افزودن منبع JavaScript مجاز و URLهای ریدایرکت مجاز.

در ادامه Client ID و Client Secret نمایش داده می‌شود. این عبارت‌ها را در یک فایل یادداشت کنید.

راه اندازی در سمت سازمان‌یار

پس از دریافت Client ID و Client Secret، پایگاه داده سازمان‌یار خود را باز کرده و وارد منوی تنظیمات ◄ تنظیمات عمومی ◄ ادغام ◄ تقویم گوگل شوید. تیک گزینه تقویم گوگل را بزنید.

گزینه تقویم گوگل در تنظیمات عمومی.

سپس، Client ID و Client Secret دریافتی را در فیلدهای مربوطه (شناسه Client ID و رمز (Secret) کاربر) زیر گزینه تقویم گوگل وارد کرده و ذخیره کنید.

همگام‌سازی تقویم در سازمان‌یار

در نهایت، در سازمان‌یار وارد برنامه تقویم شوید و برای شروع همگام‌سازی تقویم، دکمه همگام‌سازی گوگل را بزنید.

کلیک بر روی دکمه همگام‌سازی گوگل در تقویم گوگل برای همگام سازی تقویم گوگل با سازمان‌یار.

توجه

وقتی تقویم گوگل برای اولین بار با سازمان‌یار همگام‌سازی می‌شود، صفحه به حساب گوگل هدایت خواهد شد. در اینجا حساب کاربری ایمیلی که باید دسترسی داشته باشد را انتخاب کرده و Continue (ادامه) را بزنید (اگر برنامه تأیید نشده است)، و در نهایت (برای دادن اجازه انتقال داده) Continue (ادامه) را بزنید.

ارائه مجوز به سازمان‌یار برای دسترسی به تقویم گوگل.

حالا تقویم سازمان‌یار با موفقیت با تقویم گوگل همگام شد!

هشدار

اودوو شدیداً توصیه می‌کند تقویم گوگل در پایگاه داده تست و با ایمیل تست (که برای اهداف دیگری استفاده نمی‌شود) همگام‌سازی و تست شود و بعداً تقویم گوگل مربوط به پایگاه داده زیربار همگام‌سازی شود.

پس از اینکه کاربر تقویم گوگل خود را با تقویم سازمان‌یار همگام‌سازی کرد:

  • ایجاد رویداد در سازمان‌یار باعث می‌شود گوگل به تمام شرکت‌کنندگان رویداد ایمیل دعوت ارسال کند.

  • حذف رویداد در سازمان‌یار باعث می‌شود به تمام شرکت‌کنندگان رویداد اطلاعیه لغو ارسال شود.

  • افزودن مخاطب به رویداد باعث می‌شود گوگل به تمام شرکت‌کنندگان رویداد دعوتنامه ارسال کند.

  • حذف مخاطب از رویداد باعث می‌شود به تمام شرکت‌کنندگان ایمیل لغو ارسال شود.

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.

سؤالات متداول 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 Access Denied Error.

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.

نوع برنامه

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).

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.

نکته

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.