도움말

0

Partner_id name, name

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?

2의견
아바타
작성 취소
Avatar
António Ferreira
-

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.

Avatar
Sujata Bhuyan
-

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]

1응답
0
Avatar
Sujata Bhuyan
최고의 답변

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

아바타
작성 취소