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

I am editing my custom xml code and want to enable no_create only if another model's field is a certain value.

i.e. options="{"no_create": [('field_x', '=', 1)]}"

Currently I can only get the no_create option to work by setting it to True. Is there a particular syntax I may be missing to enable the use case described above?


아바타
취소
베스트 답변

Hi,

Check this Link​
I've used this method to remove create and edit from many2one based on condition.
아바타
취소
작성자

Unfortunately that work around won't work for me. For my case, if I have to create a second dummy field to then toggle I would rather generate an entirely new view. Thanks tho!

관련 게시물 답글 화면 활동
0
9월 19
5421
6
7월 24
46285
2
3월 24
17265
0
12월 19
6486
1
8월 23
2182