In the field many2one, when I finish creating data in popup Create and Edit. . .Then the name will be displayed in the default field many2one. I want it to show partner_name. What do I have to do? I tried setting _rec_name = "partner_name" but it not working. Thanks a lot!
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
Hi,
You might have to inherit and change the name_get function of the res.partner model.
See: https://www.youtube.com/watch?v=aT_tsfW5HaQ
Thanks
Hi Niyas Raphy, Thanks for your answer! But I tried to inherit name_get function.
My code:
def name_get(self):
result = []
for record in self:
result.append((record.id, '%s' % record.partner_name))
return result
It was showing properly.
But I want to say, at the end of creating new data in the popup Create and Edit...
It displays the name, not partner_name.
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
get the value of a field of other model
Diselesaikan
|
|
3
Mar 24
|
6884 | |
|
2
Feb 24
|
2028 | ||
Display values of dropdown in a many2one field
Diselesaikan
|
|
2
Feb 25
|
5610 | |
|
1
Des 24
|
1289 | ||
Odoo 13. Don't close a wizard when Click a button
Diselesaikan
|
|
4
Mei 24
|
12277 |