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
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Jun 23
|
2129 | ||
|
0
Mar 15
|
3344 | ||
|
8
Feb 24
|
12453 | ||
|
3
Aug 20
|
2828 | ||
|
1
Mar 20
|
3259 |
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]