コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
4369 ビュー

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

関連投稿 返信 ビュー 活動
2
3月 15
12427
3
8月 22
3765
7
8月 18
5903
16
12月 23
32918
3
7月 25
3867