Setting Up Gantt Chart in OpenERP 7.0

Gantt view in OpenERP is a great thing to view scheduled documents so we can monitor the activity and progress date by date.

Example below is a gantt chart for Session model.

Gantt Chart

To make Gantt view of the model, add the following record on the XML file:


<record model=”ir.ui.view” id=”view_session_gantt”>

<field name=”name”>session.gantt</field>

<field name=”model”>my_openacademy.session</field>

<field name=”arch” type=”xml”>

<gantt color=”instructor_id” date_delay=”hours” date_start=”start_date” string=”Instructor” default_group_by=”course_id”/>




The gantt element takes the following attributes:

  • date_start   = starting date
  • date_stop    = ending date, or use date_delay
  • date_delay  = how many hour is the gant chart will occupy, or use date_stop
  • string          = text to display
  • default_group_by = how will the chart is grouped by


Then, on the action window XML, add the gantt view parameter to show the icon on the window.

<record model=”ir.actions.act_window” id=”action_list_sessions” >

<field name=”name”>Sessions</field>

<field name=”res_model”>my_openacademy.session</field>

<field name=”view_mode”>tree,form,calendar,graph,gantt</field>

<field name=”help” type=”html”>

<p>session help information</p>





[box] Please contact us for further information. VITRAINING.COM Address: Grand Surapati Core Blok C-16 Jl PHH Mustofa 136 Bandung, Indonesia Telephone : +62 (22) 8724 1394 Fax : +62 (22) 8724 1394 Mobile Phone Number : +62 813 2037 9277 Email: akhmad.daniel[at] or info[at][/box]