Enable Dark Mode!
By: Pooja Raghunath

How to Create Calendar View in Odoo 14

Technical Odoo 14

No matter how big or small an industry is, it is always essential to organize meetings concerning the aspects of the company and its operations.

For both large and small scale business, the Calendars play a sterling role in keeping its employees up to date with all the events and occasions happening in the organization.

In Odoo, we have different sets of views that help to specify how the data is depicted to the user. Moreover, among these, Calendar view which provides the users with a well-sorted timeline/schedule information of data in three different formats of the calendar such as Day, Week, Months.

In this blog, we will discuss how to create calendar views 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="name">mobile.service.calendar</field>
   <field name="model">mobile.service</field>
   <field name="arch" type="xml">
       <calendar string="Service Request"
           <field name="person_name"/>
           <field name="technician_name"/>

Attributes of the calendar view are:

This field is required to specify the starting date for the event. 

This field is required to specify the ending date for the event. If mentioned in the record, the record turns to be movable in the calendar.

This field acts as an alternative to date_stop field which specifies the length of the event rather than the end date. 

This field is used to colorize calendar/gantt items.

Open view when an event is generated or modified by the user. The thing to be noted is that if the attribute is not set and if any calendar view exists in the current action, then it would fall back to the id of the form view.

If the event_open_popup="true" then the view of the respective event window will open as a popup. Otherwise, it will open events in a new form of view.

This field allows the creation of an event via instantly. Here, the user provides their name along with time which inturn helps in creating new events instantly and if the 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)

Indicate the Default view mode of calendar when the page is loaded and the possible attributes are day, week, month.

Above mentioned are some of the fields related to calendar view.

The next step is to add the calendar to view_mode in action views as shown below:

<record id="action_mobile_service_request" model="ir.actions.act_window">
   <field name="name">Service Request</field>
   <field name="res_model">mobile.service</field>
   <field name="view_mode">calendar,tree,form,kanban,pivot,graph</field>
   <field name="help" type="html">
       <p class="oe_view_nocontent_create">
           Click to Create a New Record.


The above image shows a glimpse of the calendar view.

If you need any assistance in odoo, we are online, please chat with us.


Leave a comment




Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635



Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.



Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message