Gantt Views
Gantt view为数据提供时间线视图,总体来说,它用于显示项目任务和资源分配。
甘特图是这个项目所有任务的图形显示。图的每一条显示该任务花费时间的长度。
资源分配总条在图中所有任务的上面显示,代表着任务中资源的有效利用情况。
颜色使用情况是:
Gray 显示是指这个时候资源没有分配给任何任务。
Blue 显示是指这个时候资源完全分配了。
Red 显示是指这个时候资源overallocated。
View Specification
这有一个视图例子:
<gantt color="user_id" date_delay="planned_hours" date_start="date_start" string="Tasks">
<level object="project.project" link="project_id" domain="[]">
<field name="name"/>
</level>
</gantt>
甘特图标签的属性和calendar图标签的属性类似。level标签用于将一些many2one字段的记录分组。目前仅支持one level。
下面是gantt标签的属性:
string
该视图的标题
date_start
A datetime field to specify the starting date for the gantt item. This attribute is required.
date_stop
表示结束时间的属性,如果指定了date_delay属性就可以忽视该属性。
date_delay
A numeric field to specify time in hours for a record. This attribute will get preference over date_stop and date_stop will be ignored.
day_length
显示工作时间长度的数字值,默认为8小时
color
A field, generally many2one, to colorize calendar/gantt items.
mode
A string value to set default view/zoom mode. For gantt view, this can be one of following (default is month):
day
3days
week
3weeks
month
3months
year
3years
5years
The level tag supports following attributes:
object
一个openerp对象和视图object有many2one的关系。
link
链接到给定对象的当前对象的字段名
domain
这个domain用于过滤给定的对象记录。
Drag and Drop
左边的窗格显示由level分组的任务列表。你可以重新排序或是通过拖动他们来更改记录的分组。
The main content pane displays horizontal bars plotted on a timeline grid. A group of bars are summarized with a top summary bar displaying resource allocation of all the underlying tasks.
你可以通过水平拖动任务来更改任务开始时间,当然也可以通过拖动右侧条来更改结束时间。
注解
The time is calculated considering day_length so a bar will span more then one day if total time for a task is greater then day_length value.