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

Hi!!!

Please i want to get a field from a table and i have tried this but it doesnt work. Please help me:

code:


def _get_numbers(self, cr, uid, ids, field_name, arg, context=None):

res = {}

for record in self.browse(cr, uid, ids, context=context):

res[record.id] = record.employee_id

return res

아바타
취소
베스트 답변

Guess you are getting an error because you are trying to pass the browse record, instead of just ID ..

Try this way

res[record.id] = record.employee_id.id

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

It doesnt work. I got this

Error: AttributeError: 'NoneType' object has no attribute 'browse'

아바타
취소
관련 게시물 답글 화면 활동
4
10월 16
31312
1
9월 15
3959
1
6월 15
877
0
4월 15
708
2
4월 15
898