The Calendar - Export ICS module (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/OCA/calendar/llms.txt
Use this file to discover all available pages before exploring further.
calendar_export_ics) adds a wizard to Odoo’s Calendar app that lets you produce a standards-compliant .ics file containing upcoming events for a chosen partner. The file can then be imported into Google Calendar, Apple Calendar, Outlook, or any other application that supports the iCalendar format.
Using the Export Wizard
Open the wizard
In the Calendar app, go to Configuration → Export to Ics File. A dialog opens immediately — no list view is required.
Select a partner
The Partner field defaults to the currently logged-in user’s partner (set via
default_get). ERP managers can change this to any partner in the system. Regular users always export for themselves and do not see this field.Set an optional end date
Enter a value in End Export Date to limit the export to events whose start date falls on or before that date. Leave it empty to export all future events with no upper bound.
Generate the file
Click Generate ICS File. The wizard calls
button_export(), builds the iCalendar payload, and re-opens the same wizard form with a download widget in place of the input fields.What Gets Exported
The wizard searchescalendar.event with the following filters:
- Start date ≤
export_end_date— applied only when the field is set; otherwise the range is open-ended. - Start date ≥ today — only upcoming events are included; past events are always excluded.
partner_idscontains the selected partner — events are matched by checking that the chosen partner appears in the event’s attendee list.
_get_ics_file() method generates one iCalendar document per event. The module then uses the vobject library to merge every VEVENT component into a single VCALENDAR object, which is Base64-encoded and stored in export_ics_file.
The
vobject Python package must be installed in your Odoo environment. Add it to your requirements.txt or install it with pip install vobject before activating this module.Wizard Fields
The partner whose calendar events are exported. Visible only to users in the
base.group_erp_manager group; all other users always export their own events. Defaults to the current user’s partner via default_get.Optional upper bound for the event start date. When set, only events that begin on or before this date are included in the export. Hidden after the file has been generated.
The generated
.ics file, Base64-encoded. Populated by button_export() and rendered as a download widget. Not visible until the file has been generated.The filename automatically assigned to the download, formatted as
YYYY-MM-DD_calendar.ics using today’s date (for example, 2024-05-22_calendar.ics). Stored as a hidden field and used by the binary widget’s filename attribute.Programmatic Usage
You can trigger the export from Python code — useful for automated reporting, scheduled actions, or custom integrations:Security
Access to the wizard is governed by thecalendar_export_ics.group_calendar_export security group, which is referenced in ir.model.access.csv. Members of this group have full read/write/create/unlink access to the calendar.export.ics transient model.
Within the wizard form, the Partner field carries an additional restriction: it is only visible to users who belong to base.group_erp_manager. This means:
- ERP managers can export the calendar for any partner in the system.
- Regular users always export for their own partner (set automatically via
default_get).
Module metadata
| Field | Value |
|---|---|
| Module | calendar_export_ics |
| Version | 18.0.1.0.1 |
| Author | ForgeFlow S.L. / Odoo Community Association (OCA) |
| License | AGPL-3 |
| Repository | OCA/calendar |