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
- Buchhaltung
- Lager
- PoS
- Project
- MRP
Diese Frage wurde gekennzeichnet
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
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
RegistrierenVerknüpfte Beiträge | Antworten | Ansichten | Aktivität | |
---|---|---|---|---|
|
1
Juni 23
|
4643 | ||
|
0
März 15
|
4613 | ||
|
4
Juli 25
|
1229 | ||
|
8
Feb. 24
|
15220 | ||
|
3
Aug. 20
|
4245 |
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]