Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
693 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Autor

Tried that too, but something seems missing

Publicaciones relacionadas Respuestas Vistas Actividad
0
ago 24
1147
0
oct 16
3656
3
jul 15
10229
0
nov 24
795
3
jul 23
6503