is there a way to send more fields than just display_name and id from related model in odoov14?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
Hello Mohammad Fallahi,
Please find code in comment.
I hope this will help you.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
RegistracijaRelated Posts | Replies | Rodiniai | Veikla | |
---|---|---|---|---|
|
0
geg. 23
|
2606 | ||
|
1
saus. 23
|
7362 | ||
|
1
gruod. 20
|
6977 | ||
|
1
kov. 15
|
9751 | ||
|
2
kov. 25
|
338 |