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

Hi, 

I have a user who likes to work with numbers. He wants to see the id field concatenated with the name of the customers in the search to create a sale order.




Does anyone know how I can achieve this? We are using v14. 

Regards. 


아바타
취소
작성자

It work's like a charm. Thank you. 


베스트 답변

Hi,
You can use the name_get() function in res.partner model.

def name_get(self):
res = []
for record in self:
name = record.name
rec_id = str(record.id)
display_name = rec_id + ' ' + name
res.append((record.id, display_name))
return res

Here you will get the id with name


Regards

아바타
취소
관련 게시물 답글 화면 활동
1
3월 18
7357
5
8월 24
3525
0
2월 24
28
1
5월 23
5845
0
1월 22
2906