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

Hi guys, 

I am  trying to filter the list of my many2one field

 

def _selection_function(self, cr, uid, context=None):

vals = []

<some condition >

record = id,name
vals.append(record)

return vals

fields.many2one('my.model', 'Field Name', selection=_selection_function )

But in the browser , still display all record of my model, 

아바타
취소
작성자 베스트 답변
아바타
취소
관련 게시물 답글 화면 활동
0
10월 20
3536
0
3월 15
3351
1
3월 15
6488
1
9월 23
1979
1
7월 19
7203