콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
4462 화면

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
12527
3
8월 22
3910
7
8월 18
6028
16
12월 23
33042
naked domain set up 해결 완료
3
7월 25
4125