How to make the contact name appear in contacts in the format: Partner id name, contact name.
Example I create a contact with the Name Andrés Gonzales
I create the company Azure Lda
Now the contact Andrés Gonzales associates with partner id Azure Lda
When I view Andrés Gonzales' contact, only his name appears. How to make Azure Lda appear, Andrés Gonzales
That is partner_id name, name
Can anyone help me with this?
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ờ
Hi @António Ferreira,
Can you share the view wher you want see both the names?
if you want to see it as an record name then, extending name_get method in your res.partner will help
def name_get(self):
result = []
for partner in self:
name = partner.name + ' ' +partner.[other_name]
result.append((partner.id, name))
return result
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 | |
---|---|---|---|---|
|
1
thg 6 23
|
4583 | ||
|
0
thg 3 15
|
4588 | ||
|
4
thg 7 25
|
1173 | ||
|
8
thg 2 24
|
15157 | ||
|
3
thg 8 20
|
4215 |
Hi,
Thanks for your response.
I wanted contacts to be presented that way. I created the company Azure Lda, I created an individual contact associated with the company Azure Lda: https://ibb.co/TYzmQ3t
But in my instance it looks like this: https://ibb.co/cN6qXdW
How do I make it appear in the format partner id name, individual name as the example of the first image?
Another problem is if in my instance I search for Azure, only the Azure contact appears and not the contacts associated with Azure. In the instance of the first image, if I search for Azure, the Azure contacts are displayed, as well as all the individual contacts associated with the partner id Azure.
Hi,
if you aware of a bit technical part, can you check the kanban xml view defination
for the bold Andrés Gonzales section which field is being used, if its name then change it to display_name. the display name will show the name and its partner id name if exists.
if the display_name is already there, then extend the _compute_display_name method and modify the display name by inheriting res.partner
For python code refrence you can check in the odoo source code /base/models/res_partner.py [_compute_display_name]