Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
4678 Widoki

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!

Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

Try like this,


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


Thanks

Awatar
Odrzuć
Najlepsza odpowiedź

Use this one,

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

Awatar
Odrzuć

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

Powiązane posty Odpowiedzi Widoki Czynność
2
mar 15
12776
3
sie 22
4428
7
sie 18
6359
16
gru 23
33481
3
lip 25
4724