calendar_connect_provider
One button that saves the settings, prepares the provider, restarts synchronization and sends you to the consent screen if needed.
| Technical name | calendar_connect_provider |
|---|---|
| Views | form (view widget, <widget> element) |
| Module | calendar, the Calendar app |
| Used in core | The external calendar section of calendar settings |
| Versions | Odoo 20.0, Odoo 19.0 |
| No-code setup | No. It is set in view XML and depends on module-specific data |
| Alternatives | calendar_week_days, calendar_event_notes_html, mail_server_configurator_selection |
What the connect calendar does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
external_calendar_provider | field read from the record | Selects the entry in the provider lookup table, giving the restart method and sync route.(since Odoo 19.0) |
the prepare call | server method | Prepares the external provider, installing the relevant submodule where necessary.(since Odoo 19.0) |
the sync response status | returned value | Decides between a redirect to consent, a page reload, or no navigation at all.(since Odoo 19.0) |
the before-leave hook | extension point | Does 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
Five steps, and the hook before the page leaves
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Byte-identical to Odoo 19 on the development branch. |
| Odoo 19.0 | Verified | First version. Verified against the shipped source. |
| Odoo 18.0 | Not available | Widget does not exist. |
| Odoo 17.0 | Not available | Widget does not exist. |
| Odoo 16.0 | Not available | Widget 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
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Nothing happens on click | The save failed, so the handler returned before doing anything else. Look for the validation error the view is reporting. |
| An error about an unknown provider | The 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 appears | The 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 changed | The 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 redirect | The flow navigates away deliberately. The hook method exists for extensions to persist context first. |
| The widget is missing | The Calendar module is not installed in that database. Install Calendar. |
Connect calendar vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
calendar_connect_provider | Establishing a Google or Microsoft calendar connection in one action | Runs save, prepare, restart and redirect as one guarded sequence |
calendar_week_days | Recurring event weekdays | A pattern picker rather than a connection flow |
calendar_event_notes_html | Notes on a calendar event | Content rather than configuration |
| mail_server_configurator_selection | Setting up outgoing mail | A different integration with its own flow |
Frequently asked questions
What happens if the save fails?+
How does it know which provider to connect?+
Why does the page sometimes reload?+
What is the hook method for?+
Which versions have it?+
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