Reputation: 431
In Odoo 9 I changed the treeview based on a field. This works but I would also like to make the font bold. I read that the decortion-bf can be combined to make the colors stand out better.
<tree string="Status" decoration-danger="status=='open'"
decoration-success="status=='complete'"
decoration-info="status=='progress'"
decoration-warning="status=='response'"
decoration-primary="status=='pickup'">
<field name="x_partner_id"/>
<field name="status" editable="true"/>
<field name="create_date"/>
</tree>
I tried
<tree string="Status" decoration-danger="status=='open'"
decoration-success-bf="status=='complete'"
decoration-info-bf="status=='progress'"
decoration-warning-bf="status=='response'"
decoration-primary-bf="status=='pickup'">
<field name="x_partner_id"/>
<field name="status" editable="true"/>
<field name="create_date"/>
</tree>
Upvotes: 0
Views: 878
Reputation: 2633
I believe decoration-bf
should be set separately [source], so you could write something like this:
<tree string="Status" decoration-danger="status=='open'"
decoration-success="status=='complete'"
decoration-info="status=='progress'"
decoration-warning="status=='response'"
decoration-primary="status=='pickup'"
decoration-bf="status in ('complete', 'progress', 'response', 'pickup')">
<field name="x_partner_id"/>
<field name="status" editable="true"/>
<field name="create_date"/>
</tree>
Upvotes: 1