I am trying to set different colors of tasks in tree view based on stage: ie. blue for open tasks, green for completed tasks.
Stages:
Open (id:1),
Completed (id:6),
Cancelled (id:7)
When i try this (just to check)
colors="blue:stage_id != 1
it turns every task blue including the Open tasks! So, I am not using the correct stage_id for this to work?
Here is the full xml:
<?xml version="1.0"?>
<tree default_order="x_start_date asc" fonts="bold:message_unread==True" colors="blue:stage_id != 1;" string="Tasks">
<field name="message_unread" invisible="1"/>
<field name="sequence" invisible="not context.get('seq_visible', False)"/>
<field name="name"/>
<field name="project_id" invisible="context.get('user_invisible', False)" string="PO#"/>
<field name="user_id" invisible="context.get('user_invisible', False)"/>
<field name="delegated_user_id" invisible="context.get('show_delegated', True)"/>
<field name="total_hours" invisible="1"/>
<field name="planned_hours" invisible="context.get('set_visible',False)" groups="project.group_time_work_estimation_tasks"/>
<field name="effective_hours" widget="float_time" sum="Spent Hours" invisible="1"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" on_change="onchange_remaining(remaining_hours,planned_hours)" invisible="context.get('set_visible',False)" groups="project.group_time_work_estimation_tasks"/>
<field name="date_deadline" invisible="context.get('deadline_visible',True)"/>
<field name="stage_id" invisible="context.get('set_visible',False)" string="Task Status"/>
</tree>
@anonymous: Well, i think i already have that in this line: Do i need to have any other field for this?
@Ray Carnes: I am using using V8 community version
Hello Zohair,
Please Make Sure to add field "id' in tree view (make invisible if not needed)
Example:
<tree colors= "blue:stage_id != 1;" string="Tasks">
Thanks