Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
13527 Vistas

Hello everybody!!

Who can help me please know how to make the attribute 'invisble' with two conditionsµ.

Here is my code:

<button name="cnss_generate" icon="fa-pencil-square-o" type="object" string="" attrs="{'invisible':[('period','!=',1),('state','!=', 'draft')]}"/>


Avatar
Descartar
Mejor respuesta

if you have Or Condition Try this

<button name="cnss_generate" icon="fa-pencil-square-o" type="object" string="" attrs="{'invisible':['|',('period','=',False),('state','!=', 'draft')]}"/>

For AND Condition between them then try this

<button name="cnss_generate" icon="fa-pencil-square-o" type="object" string="" attrs="{'invisible':[('period','=',False),('state','!=', 'draft')]}"/>

Avatar
Descartar
Mejor respuesta

Hi,

<button name="cnss_generate" icon="fa-pencil-square-o" type="object" string="" attrs="{'invisible':[('period','!=',1),('state','!=', 'draft')]}"/>


It is enough to make the attribute 'invisible' with two conditions.

Avatar
Descartar