Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
13516 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Risposta migliore

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
Abbandona