Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
13524 Переглядів

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')]}"/>


Аватар
Відмінити
Найкраща відповідь

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')]}"/>

Аватар
Відмінити
Найкраща відповідь

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.

Аватар
Відмінити