跳至内容
菜单
此问题已终结
3 回复
4149 查看

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
3891
2
7月 25
4604
2
12月 24
7762
2
12月 24
2403
2
11月 24
28521