Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3699 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
How to display Search Bar in a wizard แก้ไขแล้ว
1
มี.ค. 18
7259
5
ส.ค. 24
3359
0
ก.พ. 24
28
How to become a Odoo Ready Partner ? แก้ไขแล้ว
1
พ.ค. 23
5734
0
ม.ค. 22
2828