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
- Contabilità
- Magazzino
- PoS
- Project
- MRP
La domanda è stata contrassegnata
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
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
RegistratiPost correlati | Risposte | Visualizzazioni | Attività | |
---|---|---|---|---|
|
0
mag 23
|
2894 | ||
|
1
gen 23
|
7684 | ||
|
1
dic 20
|
7207 | ||
|
1
mar 15
|
9979 | ||
|
2
mar 25
|
549 |