Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
3700 Visninger

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. 


Avatar
Kassér
Forfatter

It work's like a charm. Thank you. 


Bedste svar

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

Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
1
mar. 18
7260
5
aug. 24
3359
0
feb. 24
28
1
maj 23
5734
0
jan. 22
2828