Skip to Content
Menu
This question has been flagged
2 Replies
4612 Rodiniai

I would like to change the color of the label/string and the value of the field in kanban view whenever the priority id field changes its value(VIP, HIGH, LOW, etc.) and i want to assign different color for each value..Thank very much in advance.

Portretas
Atmesti
Best Answer

In Odoo 14 you have to set it to a div around the field to color it.

<div t-attf-class="text-danger">
​<field name="field_name" attrs="{'invisible': [('other_field', '=', False)]}"/>
div>


And you can make it conditional:

<div t-attf-class="#{record.value > 3 and 'danger' or 'warning'}">
​<field name="field_name" />
div>
Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
12
spal. 23
35784
0
kov. 15
4661
4
kov. 15
4881
2
kov. 15
6036
4
kov. 15
4913