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
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
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
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
InscribirsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
1
jun 23
|
3063 | ||
|
0
mar 15
|
3809 | ||
|
8
feb 24
|
13452 | ||
|
3
ago 20
|
3389 | ||
Contacts module python code odoo12
Resuelto
|
|
1
mar 20
|
3911 |
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]