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
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
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
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
0
thg 5 23
|
3832 | ||
|
1
thg 1 23
|
8608 | ||
|
1
thg 12 20
|
8158 | ||
|
1
thg 3 15
|
10577 | ||
|
2
thg 3 25
|
1274 |