[MOV] calendar: "Calendar" app from "Misc" to "Productivity"

To improve the structure of the documentation, the "Miscellaneous"
section should be limited as much as possible.

This commit:
- renames "Calendars" into "Calendar" (as the app name)
- moves the app from the "Miscellaneous" section to the "Productivity"
  section
- fixes the wrong file structure to follow the toc
  (e.g. general/calendars/outlook/outlook_calendar -> productivity/calendar/outlook)

task-3217827

closes odoo/documentation#4123

Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
This commit is contained in:
Jonathan Castillo (jcs)
2023-04-05 10:10:24 +00:00
parent 62917665e3
commit 3d2c5d7c16
27 changed files with 46 additions and 41 deletions
@@ -0,0 +1,11 @@
:nosearch:
========
Calendar
========
.. toctree::
:titlesonly:
calendar/outlook
calendar/google
@@ -0,0 +1,135 @@
===============================
Google Calendar synchronization
===============================
Synchronize Google Calendar with Odoo to see and manage meetings from both platforms (updates go
in both directions). This integration helps organize your schedule so you never miss a meeting.
.. seealso::
- :doc:`/applications/general/auth/google`
- :doc:`/administration/maintain/google_oauth`
Setup in Google
===============
Enable Google Calendar API
--------------------------
Begin by creating a new Google API project and enabling the Google Calendar API. Then, go to the
`Google API Console <https://console.developers.google.com>`_ and log into your Google account.
.. note::
If this is your first time visiting this page, Google will prompt you to enter a country and
agree to the Terms of Service. Select a country from the drop-down list and agree to the
:abbr:`ToS (Terms of Service)`.
Next, click :guilabel:`Select a project` and select or create an API project to store credentials.
.. image:: google/new-api-project.png
:align: center
:alt: Create a new API project to store credentials.
.. tip::
Give the API Project a clear name like "Odoo Sync" so you can easily find it.
Then, open the API Project and click :guilabel:`Enable APIs and Services`.
.. image:: google/enable-apis-services.png
:align: center
:alt: Enable APIs and Services on the API Project.
After that, search for *Google Calendar API* using the search bar and select :guilabel:`Google
Calendar API` from the search results. Click :guilabel:`Enable`.
.. image:: google/enable-google-cal-api.png
:align: center
:alt: Enable the Google Calendar API.
Create credentials
------------------
Now that you have created your API project and enabled the Google Calendar API, you need to create
credentials. Begin by clicking :guilabel:`Create Credentials`. Google will then guide you through
four steps to create your API credentials.
- In the first step, :guilabel:`Credential Type`, select the :guilabel:`Google Calendar API` and
:guilabel:`User Data` options. Then, click :guilabel:`Next`.
.. image:: google/credential-type.png
:align: center
:alt: Select Google Calendar API and User Data for the Credential Type.
- In the second step, :guilabel:`OAuth Consent Screen`, type *Odoo* in the :guilabel:`App name`
field, select your email address for the :guilabel:`User support email` field, and type your email
address for the :guilabel:`Developer contact information` section. Then, click :guilabel:`Save
and Continue`.
- Skip the third step, :guilabel:`Scopes`, by clicking :guilabel:`Save and Continue`.
- In the last step, :guilabel:`OAuth Client ID`, select :guilabel:`Website application` for the
:guilabel:`Application Type` field and type *My Odoo Database* for the :guilabel:`Name`.
- Under the :guilabel:`Authorized JavaScript Origins` section, click :guilabel:`+ Add URI` and
type your company's Odoo URL address.
- Under the :guilabel:`Authorized redirect URIs` section, click :guilabel:`+ Add URI` and type
your company's Odoo URL address followed by */google_account/authentication*. Finally, click
:guilabel:`Create` and :guilabel:`Done`.
.. image:: google/uri.png
:align: center
:alt: Add the authorized JavaScript origins and the authorized redirect URIs.
After successfully creating a new API project, enabling the Google Calendar API, and generating the
Google Calendar API credentials, you should now have a Client ID and Client Secret.
Client ID & Client Secret
-------------------------
The **Client ID** and the **Client Secret** are both needed to connect Google Calendar to Odoo. Find
the Client ID and the Client Secret by opening the Google Cloud Platform navigation menu and going
to :menuselection:`API & Services --> Credentials --> OAuth 2.0 Client IDs`.
Next, locate the credentials you just created for the Google Calendar API. Then, click on
:guilabel:`Edit OAuth Client` (the pencil icon). The page will redirect to the edit page, where you
can view the Client ID and the Client Secret.
.. image:: google/edit-oauth-2.png
:align: center
:alt: Click Edit OAuth Client to view the credential details.
Setup in Odoo
=============
Once the Client ID and the Client Secret are located, open the Odoo database and go to
:menuselection:`Settings --> General Settings --> Integrations --> Google Calendar`. Check the box
next to :guilabel:`Google Calendar`.
.. image:: google/settings-google-cal.png
:align: center
:alt: The Google Calendar checkbox in General Settings.
Next, copy and paste the Client ID and the Client Secret from the Google Calendar API Credentials
page into their respective fields below the :guilabel:`Google Calendar` checkbox. Then, click
:guilabel:`Save`.
Finally, open the Calendar module in Odoo and click on the :guilabel:`Google` sync button to sync
Google Calendar with Odoo.
.. image:: google/sync-google.png
:align: center
:alt: Click the Google sync button in Odoo Calendar to sync Google Calendar with Odoo.
.. note::
The first time you sync your Google Calendar with Odoo, the page will redirect to your Google
Account. Click :guilabel:`OK` and :guilabel:`Allow` to authorize Odoo to access Google Calendar.
.. image:: google/trust-odoo.png
:align: center
:alt: Give Odoo permission to access Google Calendar.
Now, Odoo Calendar is successfully synced with Google Calendar!
.. image:: google/successful-sync.png
:align: center
:alt: Successfully sync between Odoo and Google Calendar.
Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@@ -0,0 +1,144 @@
================================
Outlook Calendar synchronization
================================
Synchronizing a user's Outlook Calendar with Odoo is useful for keeping track of their tasks and
appointments across all related applications.
.. seealso::
- :doc:`/applications/general/auth/azure`
- :doc:`/administration/maintain/azure_oauth`
Register the application with Microsoft Azure
=============================================
To sync the Outlook Calendar with Odoo's Calendar, a Microsoft Azure account is needed. Creating an
account is free for users who have never tried or paid for Azure. For more information, `click here
<https://azure.microsoft.com/en-us/free/?WT.mc_id=A261C142F>`_.
Refer to `Microsoft's documentation <https://docs.microsoft.com/en-us/azure/active-directory/
develop/quickstart-create-new-tenant>`_ on how to set up an Azure AD Tenant (also called an
*environment*), which is a representation of an organization to manage and register apps.
Then, `Register an Application <https://docs.microsoft.com/en-us/azure/active-directory/develop/
quickstart-register-app>`_, choosing the appropriate :guilabel:`Supported account type`. Users who
wish to connect their Outlook calendar to Odoo should select the :guilabel:`Accounts in any
organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts
(e.g. Skype, Xbox)` option for :guilabel:`Supported account types`.
When configuring the :guilabel:`Redirect URI`, choose :guilabel:`Web` and copy the Odoo database
URI (URL) followed by `/microsoft_account/authentication`.
.. example::
Enter `https://www.companyname.odoo.com/microsoft_account/authentication` for the
:guilabel:`Redirect URI`.
.. image:: outlook/azure-register-application.png
:align: center
:alt: The "Supported account type" and "Redirect URI" settings in the Microsoft Azure AD portal.
For more information on the restrictions and limitations of URIs, `check this page <https://docs.
microsoft.com/en-us/azure/active-directory/develop/reply-url>`_.
Regarding the application credentials, the user *must* add a client secret, which allows Odoo to
authenticate itself, requiring no interaction from the user's side. :guilabel:`Certificates` are
optional.
To do add a client secret, click :guilabel:`Add a certificate or secret` and then click
:guilabel:`New client secret`. Next, type a :guilabel:`Description` and select when the client
secret :guilabel:`Expires`.
Since resetting the synchronization can be tricky, Odoo recommends setting the maximum allowed
expiration date for the client secret (24 months), so there is no need to re-synchronize soon.
Finally, click :guilabel:`Add` to generate the client secret (:guilabel:`Secret ID`).
Configuration in Odoo
=====================
In the Odoo database, go to :menuselection:`Settings --> General Settings --> Integrations` and
activate the :guilabel:`Outlook Calendar` setting.
.. image:: outlook/outlook-calendar-setting.png
:align: center
:alt: The "Outlook Calendar" setting activated in Odoo.
From the Microsoft Azure portal, under the :guilabel:`Overview` section of the application, copy
the :guilabel:`Application (Client) ID`, and paste it into the :guilabel:`Client ID` field in Odoo.
.. image:: outlook/client-id.png
:align: center
:alt: The "Client ID" in the Microsoft Azure portal.
In the Microsoft Azure portal, under the :guilabel:`Certificates & secrets` section, copy the
:guilabel:`Client Secret Value` and paste it into the :guilabel:`Client Secret` field in Odoo.
.. image:: outlook/client-secret-value.png
:align: center
:alt: The "Client Secret" token to be copied from Microsoft to Odoo.
Finally, on the Odoo :menuselection:`Settings --> General Settings` page, click :guilabel:`Save`.
.. _outlook/sync:
Sync with Outlook
=================
.. warning::
Odoo highly recommends testing the Outlook calendar synchronization on a test database and a
test email address (that is not used for any other purpose) before attempting to sync the
desired Outlook Calendar with the user's production database.
If the user has any past, present, or future events on their Odoo calendar before syncing their
Outlook calendar, Outlook will treat the events pulled from Odoo's calendar during the sync as
new events, causing an email notification to be sent from Outlook to all the event attendees.
To avoid unwanted emails being sent to all past, present, and future event attendees, the user
must add the events from the Odoo calendar to the Outlook calendar before the first ever sync,
delete the events from Odoo, and then start the sync.
Even after synchronizing the Odoo Calendar with the Outlook calendar, Outlook will still send a
notification to all event participants every time an event is edited (created, deleted,
unarchived, or event date/time changed), with no exceptions. This is a limitation that cannot be
fixed from Odoo's side.
After one user syncs their Outlook calendar to the Odoo database, unwanted email notifications
are unavoidable because the first synchronized user's events will be in the Odoo Calendar. If
the Odoo database is shared amongst multiple users, and another user wants to sync their Outlook
calendar with Odoo Calendar, Outlook will again pull the existing Odoo Calendar events during
the sync and treat them as new events, causing Outlook to send email invitations to all event
attendees.
In summary, once a user synchronizes their Outlook calendar with the Odoo calendar:
- Creating an event in Odoo causes Outlook to send an invitation to all event attendees.
- Deleting an event in Odoo causes Outlook to send a cancellation to all event attendees.
- Unarchiving an event in Odoo causes Outlook to send an invitation to all event attendees.
- Archiving an event in Odoo causes Outlook to send a cancellation to all event attendees.
- Adding a contact to an event causes Outlook to send an invitation to all event attendees.
- Removing a contact from an event causes Outlook to send a cancellation to all event attendees.
Sync Odoo Calendar and Outlook
------------------------------
In the Odoo database, go to the :guilabel:`Calendar` module and click the :guilabel:`Outlook` sync
button. The page will redirect to a Microsoft login page, and the user is asked to log in to
their account, if they are not already, and grant the required permissions.
.. image:: outlook/outlook-sync-button.png
:align: center
:alt: The "Outlook" sync button in Odoo Calendar.
The synchronization is a two-way process, meaning that events are reconciled in both accounts
(Outlook and Odoo).
.. note::
All users that want to use the synchronization simply need to :ref:`sync their calendar with
Outlook <outlook/sync>`. The configuration of Microsoft's Azure account
is only done once, as Azure AD tenants' Client IDs and Client Secrets are unique, and represent
an organization that helps the user to manage a specific instance of Microsoft cloud services
for their internal and external users.
.. seealso::
- :doc:`../mail_plugins/outlook`
- :doc:`google`
Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB