Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
3 Vastaukset
4135 Näkymät

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?

Avatar
Hylkää

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

Paras vastaus

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,

Avatar
Hylkää
Tekijä

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

Tekijä Paras vastaus

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.

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
kesäk. 20
3882
2
heinäk. 25
4573
2
jouluk. 24
7720
2
jouluk. 24
2394
2
marrask. 24
28473