İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
5067 Görünümler

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!

Avatar
Vazgeç
En İyi Yanıt

Hi,

Try like this,


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


Thanks

Avatar
Vazgeç
En İyi Yanıt

Use this one,

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

Avatar
Vazgeç

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

İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Mar 15
13284
3
Ağu 22
4996
7
Ağu 18
6785
16
Ara 23
34000
3
Tem 25
5487