Skip to main content
iVentureTeam

calendar_connect_provider

One button that saves the settings, prepares the provider, restarts synchronization and sends you to the consent screen if needed.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 27, 2026Updated August 28, 20264 min read
Technical namecalendar_connect_provider
Viewsform (view widget, <widget> element)
Modulecalendar, the Calendar app
Used in coreThe external calendar section of calendar settings
VersionsOdoo 20.0, Odoo 19.0
No-code setupNo. It is set in view XML and depends on module-specific data
Alternativescalendar_week_days, calendar_event_notes_html, mail_server_configurator_selection

What the connect calendar does

Connecting Odoo to Google or Microsoft calendar is genuinely several operations: the credentials have to be saved, the right submodule installed, the user's synchronization state reset, and then the browser has to be sent to the provider's consent screen.

Historically that meant a sequence of buttons and a fair amount of documentation. This widget collapses it into one button that runs the whole sequence and lands you wherever the flow needs you next.

Which provider is being connected comes from the record, and a small lookup table maps it to the right server method and route.

What this means for your team

Calendar sync is one of the highest-value integrations for a services business, because it is what keeps availability real rather than aspirational. It is also one of the most abandoned, because the setup traditionally fails halfway and leaves no clue where.

A single button that saves, prepares, restarts and redirects is worth more than it looks: each of those steps was previously a place to stop. The remaining prerequisite is the credentials on the provider side, which no widget can shortcut.

Supported options in Odoo 19

The widget declares no options and takes the standard view widget props. The provider lookup table it uses is described below. Read from the calendar connect provider source, Odoo 19.0.

OptionTypeWhat it does
external_calendar_providerfield read from the recordSelects the entry in the provider lookup table, giving the restart method and sync route.(since Odoo 19.0)
the prepare callserver methodPrepares the external provider, installing the relevant submodule where necessary.(since Odoo 19.0)
the sync response statusreturned valueDecides between a redirect to consent, a page reload, or no navigation at all.(since Odoo 19.0)
the before-leave hookextension pointDoes nothing by default. Runs before either navigation so extensions can persist context.(since Odoo 19.0)

The save comes first, and can stop everything. If saving the record fails, the handler returns without doing anything else and leaves the view to report the problem, so a validation error never becomes a half-completed connection.

Working examples

Placing it

<widget name="calendar_connect_provider"/>

No attributes. The provider comes from the record.

The provider lookup

google     -> restart method, sync route
microsoft  -> restart method, sync route

Two entries, chosen by the record's provider field.

What the response decides

need_auth     -> go to the consent screen
need_refresh  -> reload the page
otherwise     -> stay put

Three outcomes from one call.

Five steps, and the hook before the page leaves

The sequence is worth walking through, because each step exists for a reason.

First the record is saved, and a failed save returns immediately. Second, a server method prepares the external provider, which is where a missing submodule gets installed. Third, the provider lookup gives the restart method name and the sync route for whichever provider the record names.

Fourth, the restart method is called for the current user, clearing whatever synchronization state existed. Fifth, the sync route is called with the calendar event model and the current page address, so the provider knows where to send the user back.

The response then decides. Needing authorization sends the browser to the returned consent address; needing a refresh reloads the page; anything else leaves the user where they are.

Between the response and either navigation sits a hook method that does nothing by default. It exists so that a module extending this widget can persist context before the page goes away, which is the only reason a redirect-heavy flow can be extended safely.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. Byte-identical to Odoo 19 on the development branch.
Odoo 19.0VerifiedFirst version. Verified against the shipped source.
Odoo 18.0Not availableWidget does not exist.
Odoo 17.0Not availableWidget does not exist.
Odoo 16.0Not availableWidget does not exist.

Upgrade note. The widget is new in Odoo 19. On earlier versions the same flow was spread across separate buttons in the provider modules, so an upgrade consolidates it with the standard views and no configuration is lost.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The development branch is unstable and this may still change; we re-verify this page after the release.

Byte-identical. The file on the development branch matches Odoo 19 exactly, including the provider lookup table and the hook method.

Common problems and fixes

SymptomCause and fix
Nothing happens on clickThe save failed, so the handler returned before doing anything else. Look for the validation error the view is reporting.
An error about an unknown providerThe provider field holds a value with no entry in the lookup table. Set it to one of the two supported providers.
The consent screen never appearsThe response did not ask for authorization, usually because a token already exists. Expected. Revoke the existing access to reconnect from scratch.
The page reloads and nothing changedThe response asked for a refresh, which is how new data is picked up. Check the synchronization status after the reload.
Unsaved work is lost on redirectThe flow navigates away deliberately. The hook method exists for extensions to persist context first.
The widget is missingThe Calendar module is not installed in that database. Install Calendar.

Connect calendar vs the alternatives

WidgetBest forKey difference
calendar_connect_providerEstablishing a Google or Microsoft calendar connection in one actionRuns save, prepare, restart and redirect as one guarded sequence
calendar_week_daysRecurring event weekdaysA pattern picker rather than a connection flow
calendar_event_notes_htmlNotes on a calendar eventContent rather than configuration
mail_server_configurator_selectionSetting up outgoing mailA different integration with its own flow

The provider modules still expose their own actions, which is what to use when diagnosing a connection rather than establishing one. This widget is for the first connection, where the sequence is the hard part.

Frequently asked questions

What happens if the save fails?+
The handler returns immediately and leaves the view to report the error, so a validation problem never turns into a half-completed connection.
How does it know which provider to connect?+
From a field on the record, which selects an entry in a two-item lookup table giving the restart method and the sync route.
Why does the page sometimes reload?+
The sync response can ask for a refresh rather than authorization, which is how newly available data gets picked up.
What is the hook method for?+
It does nothing by default and runs before either the redirect or the reload, so a module extending this widget can persist context before the page goes away.
Which versions have it?+
Odoo 19 onwards, and byte-identical on the Odoo 20 development branch.

Calendar sync that stays connected

Google and Microsoft calendar integrations fail quietly and get abandoned, usually over credentials rather than code. We set up and maintain Odoo calendar sync properly, on versions 16 through 19.

Book a free consultation

How this page was produced

The save-first guard, the prepare call, the provider lookup table with its restart methods and sync routes, the three response outcomes and the hook method before navigation were read from the calendar connect provider source on the Odoo 19.0 branch. Version coverage comes from the absence of the file on 16.0, 17.0 and 18.0, and a byte comparison against the public development branch. Spotted an error? Tell us and we will correct the page.