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

Hi Odooers,

I want  "Btn eval" to be invisible when "QA Checking products" field (a many2many field) is empty. 

With codes below, the "Btn eval" is still showing. Please correct me if I am wrong in the xml codes

invisible="qa_check_product_ids == False"






아바타
취소
베스트 답변

Hello,

You could try this instead:invisible="not qa_check_product_ids"


Hope it helps.

아바타
취소
작성자 베스트 답변

Thank all of you. I use the following and now the result is expected.

invisible="not qa_check_product_ids"


아바타
취소

Nice, up vote the answer or mark best one maybe

베스트 답변

You can try

"not qa_check_product_ids". Normally relation field like many2one or x2m will use "not"

아바타
취소
베스트 답변

Hi,

The expression qa_check_product_ids == False won't work as expected because many2many fields are represented by a list, and an empty list is not equal to False. Instead, you need to check if the list is empty.

You can try it like that:


아바타
취소
관련 게시물 답글 화면 활동
4
5월 25
2641
2
5월 25
6057
1
3월 25
1760
4
3월 25
4629
3
2월 25
5653