Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
1066 Vizualizări

is_service_available = fields . Boolean (string = "Service Availability", default = False)


< div t-if = "record.is_service_available.value == True " >

< span style = "color: green;" > ON NET </ span ></div>​​

< div t-else = "" > 

< span style = "color: red;" > OFF NET </ span ></ div >



odoo 17, how to check boolean conditions in xml

Imagine profil
Abandonează
Cel mai bun răspuns

Hi,
May be you missed else condition ?

< t t-if = "record.is_service_available" >

< span style = "color: green;" > ON NET </ span >

</ t >

<t t-else="">

< span style = "color: red;" > OFF NET </ span >
</ t >

Thanks

Imagine profil
Abandonează
Autor

Tried that too, but something seems missing

Related Posts Răspunsuri Vizualizări Activitate
0
aug. 24
1649
0
oct. 16
3908
3
iul. 15
10593
0
nov. 24
1150
3
iul. 23
6954