Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
4189 มุมมอง

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.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
odoo 10 how to colorize order lines แก้ไขแล้ว
1
มิ.ย. 20
3932
2
ก.ค. 25
4665
2
ธ.ค. 24
7793
2
ธ.ค. 24
2448
How to ORDER BY? [Odoo 10] แก้ไขแล้ว
2
พ.ย. 24
28568