Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
5002 Vues

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.

Avatar
Ignorer
Meilleure réponse

See if this widget can help you: 

​https://apps.odoo.com/apps/modules/10.0/web_widget_colorpicker/




Avatar
Ignorer
Meilleure réponse

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>
Avatar
Ignorer
Publications associées Réponses Vues Activité
12
oct. 23
36074
0
mars 15
5032
4
mars 15
5208
2
mars 15
6274
4
mars 15
5080