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

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

Microsoft Azure setup

برای همگام‌سازی تقویم اوت‌لوک با تقویم سازمان‌یار، حساب مایکروسافت آژور الزامی است. ایجاد این حساب برای کاربرانی که تاکنون آژور را امتحان نکرده و پرداختی برای آن نداشته‌اند رایگان است. برای اطلاعات بیشتر درباره حساب‌های کاربری اینجا کلیک کنید.

برای کسب اطلاعات بیشتر در خصوص تنظیمات Microsoft Entra ID (که قبلاً دایرکتوری فعال مایکروسافت آژور (Azure ID) نامیده می‌شد) به راهنمای مایکروسافت مراجعه نمایید. این ابزار یک کنسول API است که برای مدیریت و ثبت برنامه‌های مایکروسافت استفاده می‌شود.

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.

مثال

در Redirect URI متن https://yourdbname.tashilgostar.com/microsoft_account/authentication را تایپ کنید. البته yourdbname.tashilgostar.com را با URL اختصاصی خود جایگزین کنید.

نکته

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.

The "Supported account type" and "Redirect URI" settings in the Microsoft Entra ID portal.

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 پیکربندی در سمت سازمان‌یار.

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.

برای درج رمز کاربر، بر روی Certificates & secrets کلیک کرده و سپس + New 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.

نکته

از آنجاییکه ریست (بازنشانی) همگام‌سازی مشکلات خودش را دارد، اودوو پیشنهاد می‌کند حداکثر تاریخ انقضای ممکن برای رمز کاربر (یعنی 24 ماه) تعیین شود، و نیازی به همگام‌سازی زود هنگام نباشد.

Copy the Value for use in the next section.

هشدار

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

پیکربندی در سمت سازمان‌یار

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.

فعال‌سازی تنظیمات تقویم سازمان‌یار در سمت سازمان‌یار.

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.

Client ID در پورتال مایکروسافت آژور.

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

توکن Client Secret برای کپی از مایکروسافت به سازمان‌یار.

بعد از انجام تنظیمات و ورود مقادیر، در صفحه تنظیمات ◄ تنظیمات عمومی دوباره ذخیره را بزنید.

همگام‌سازی با اوت‌لوک

هشدار

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

اگر قبل از همگام‌سازی با تقویم اوت‌لوک، کاربر دارای رویداد گذشته، فعلی یا آینده در سازمان‌یار باشد، اوت‌لوک رویدادهای دریافتی از تقویم سازمان‌یار را رویدادهای جدید تلقی می‌کند، و باعث می‌شود به تمام شرکت‌کنندگان رویداد ایمیل اطلاع‌رسانی ارسال شود.

برای جلوگیری از ارسال ایمیل ناخواسته به شرکت‌کنندگان رویدادهای قبلی، فعلی و آینده، کاربر باید قبل از اولین همگام‌سازی، رویدادها را از تقویم سازمان‌یار به تقویم اوت‌لوک وارد کند، رویدادها را از سازمان‌یار حذف کند، و سپس همگام‌سازی را شروع کند.

حتی بعد از همگام‌سازی تقویم سازمان‌یار با اوت‌لوک، هرگاه رویدادی ویرایش شود (ایجاد، حذف، خروج از بایگانی، و یا حتی تغییر تاریخ و زمان)، بدون استثناء به تمام شرکت‌کنندگان رویداد اطلاع‌رسانی ارسال خواهد شد. این محدودیت را نمی‌توان در سمت سازمان‌یار برطرف کرد.

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

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

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

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

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

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

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

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

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.

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

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.

توجه

تمام کاربرانی که می‌خواهند از همگام‌سازی استفاده کنند، تنها کافیست تقویم خود را با اوت‌لوک همگام کنند. پیکربندی حساب مایکروسافت آژور فقط یکبار انجام می‌شود، چراکه Client ID و Client Secret (شناسه مشتری و رمز حساب) در Microsoft Entra ID منحصر به فرد و نماینده سازمان است، که به کاربر اجازه می‌دهد یک واقعه از خدمات ابری مایکروسافت را برای کاربران داخلی و خارجی خود مدیریت کند.

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.