콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
4272 화면

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
35455
0
3월 15
4276
4
3월 15
4491
2
3월 15
5645
4
3월 15
4650