Skip to Content
Menu
This question has been flagged
2 Replies
12837 Views

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
Discard
Best Answer

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
Discard
Best Answer

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
Discard