Gantt View

Gantt view is part of the enterprise version, so it will not work if you are using the Odoo community edition. If you want to use it in the community edition, you can use a similar module web_timeline from the web repository of the OCA. This module introduces a view that can be used if you want a gantt-style representation.

To use the gantt view in your module, you need to add the web_gantt dependency in the manifest file. web_gantt is available in the enterprise edition. If you are using the enterprise edition, you can add the gantt view as follows:

<record id="view_project_task_calendar" model="ir.ui.view">
<field name="model">project.task.gantt</field>
<field name="model">project.task</field>
<field name="arch" type="xml">
<gantt date_start="date_assign"
date_stop="date_deadline"
default_group_by="user_id">
</gantt>
</field>
</record>

In the enterprise gantt view, you can use the following options:

  • date_start: The value of this option will be the name of the date or the datetime field that holds the start date for the gantt record.
  • date_stop: The value of this option will be the name of the date or the datetime field that holds the end date for the gantt record.
  • date_delay: If you don't want to use date_stop, you can use this option. This will be used to calculate the duration of the gantt record.
  • duration_unit: The value of this option will be one of the following: minute, hour (default), day, week, month, or year.
  • default_group_by: This is the name of the field by which gantt records are grouped.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset