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

Hello all,

'mediaid' is a fields.Char in my customize model.

mediaid = fields.Char(string='Media Id')

I add a button in the form view of this mode.

<button name="My Button" type="object" string="do_something" attrs="{'invisible': [('mediaid', '=', None)]}"/>

But the button is still visible when the data in 'mediaid' is 'None'.

So, How to fix the view code to make it invisible?

Please help!

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

Hi,

Try like this,


<button name="My Button" type="object" string="do_something" attrs="{'invisible': [('mediaid', '=', False)]}"/>


Thanks

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

Use this one,

attrs="{'invisible': [('mediaid', '=', False)]}"

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

Hi, already the same answer is given above and it gets upvoted. Then why the same?

ok i think its by mistake, i have not seen the above one

Related Posts Відповіді Переглядів Дія
2
бер. 15
12623
3
серп. 22
4147
7
серп. 18
6179
16
груд. 23
33237
naked domain set up Вирішено
3
лип. 25
4412