Skip to Content
मेन्यू
This question has been flagged

is there a way to send more fields than just display_name and id from related model in odoov14?

Avatar
Discard
Best Answer

Hello Mohammad Fallahi, 

Please find code in comment. 

I hope this will help you. 

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

Avatar
Discard

please try this

there are two ways:

first Way
def name_get(self):
result = []
for rec in self:
display_name = f"[{rec.field_name}] {rec.field_name}"
result.append((rec.id, display_name))
return result

second way
def name_get(self):
record = []
for record in self:
record.append((res.id, '%s - %s' % (res.field_name, field.field_name)))
return record

Related Posts Replies Views Activity
0
मई 23
3879
1
जन॰ 23
8672
1
दिस॰ 20
8207
1
मार्च 15
10663
2
मार्च 25
1304