Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
4917 Ansichten

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
Verwerfen
Beste Antwort

See if this widget can help you: 

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




Avatar
Verwerfen
Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
12
Okt. 23
36015
0
März 15
4950
4
März 15
5118
2
März 15
6218
4
März 15
5050