Calendars primarily support the setting of a specific date that is useful for scheduling meetings. It helps in easy prioritizing and reviewing activities scheduled for a specific time frame. However, this technique can also be used to complete specific tasks on your to-do list. The feature thus of Calendar, holds the users responsible for their actions.
In Odoo, as the name suggests, this view type reflects the calendar type records. Therefore it can be viewed in three different formats of the calendar such as a Day, Week, Month.
This tutorial directs you through how to visually display and edit date details in your records.
Here is an example of Calendar views:
<record id="mobile_service_view_calendar" model="ir.ui.view">
<field name="arch" type="xml">
<calendar string="Service Request"
In a daily, weekly or monthly calendar, calendar views display records as events.< calendar > is the root part.
Attributes of the calendar view are:
Name of the field to record the start date of the event.
Name of the field to record the end date of the event. If date_stop is provided in the record, the record becomes movable in the calendar.
An alternative to date_stop indicates the length of the event rather than the end date.
Name of the colour segmentation record field to be used. Records are assigned the same highlight colour in the calendar in the same colour line, colours are allocated semi-randomly.
Open view when an event is generated or modified by the user. Remember that if this attribute is not set, the calendar view in the current action, if any, will fall back to the id of the form view.
If the event_open_popup="true" then the view in the calendar event window opens as a popup of a form view. Otherwise, it will open events in a new form of view.
Allows the creation of a fast event via instant click. The click asks the user for a name and via entering the name along with the time for the event, one can quickly create a new event. Off the chance, if quick creation fails, it returns to a full form dialogue.
Name of the record boolean field indicating whether the corresponding event is flagged as day-long (and irrelevant for the duration)
Default view mode when the calendar is loaded. Possible attributes are: day, week, month
The field shown in the calendar cards.
Note: Don’t forget to add the calendar to view_mode in action views.
<record id="action_mobile_service_request" model="ir.actions.act_window">
<field name="name">Service Request</field>
<field name="help" type="html">
Click to Create a New Record.