コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
5003 ビュー

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.

アバター
破棄
最善の回答

See if this widget can help you: 

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




アバター
破棄
最善の回答

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>
アバター
破棄
関連投稿 返信 ビュー 活動
12
10月 23
36074
0
3月 15
5032
4
3月 15
5208
2
3月 15
6274
4
3月 15
5080