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

Hi Guys,

i'm wondering is it possible to change text style (color, bold etc) for text values in SO, for example client name or phone?

아바타
취소

if you are talking about odoo fields, than just inherit that field and apply inline css as per ur need

베스트 답변

Dear Rostyslav Sulym,

Try this code to check your selection field value and apply change text style based on color and, bold.

<t t-if-"Good">
      <t t-set="style" t-value="'color:blue'" />
</t>
<t t-if-"
Bad">
      <t t-set="style" t-value="'color:red'" />
</t>
                        
<span t-att-style="style" >Test</span>


Thanks,

아바타
취소
작성자

hello, thanks for reply, but this is for Qweb, it's not suitable in my case

작성자 베스트 답변

I’m taking Odoo about field selection field. actually I want to apply style based on selection field value(Good, Bad). Let say selection field value is “Good” then show In Green bold if value is “Bad” then show red bold. We can’t achieve this through apply inline CSS as per your suggestion.

아바타
취소
관련 게시물 답글 화면 활동
1
6월 20
3993
2
7월 25
4915
2
12월 24
7955
2
12월 24
2627
2
11월 24
28774