Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
996 Visualizzazioni

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

Avatar
Abbandona
Risposta migliore

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

Avatar
Abbandona
Autore

Tried that too, but something seems missing

Post correlati Risposte Visualizzazioni Attività
0
ago 24
1586
0
ott 16
3856
3
lug 15
10541
0
nov 24
1057
3
lug 23
6889