This question has been flagged
3 Replies
3474 Views

I am trying to do a search for contacts that are linked to a company record where the company has either a field with a specific value or a specific tag set on it. Can this be done in Odoo v8.0?

I have tried search in the Customers view with a filter for both "Contacts" and "Tag contains My_Tag" and i'm not returning any records. The contacts i am searching for don't have "My_Tag" set on them. Only the companies that they work for have the tag set.

Avatar
Discard
Author

Akhil - i tried your suggestion but i don't find any records. I have edited my question to explain further.....

In tag, are you setting the job roles of contacts?

Author Best Answer

Hello Vasanth

I my database the companies I'm searching for have a tag set called "Veterinary". If i do a search for "Companies" and Tag = "Veterinary", i get a list of all of the Veterinary Companies in the DB. So that part is working OK.

Now, what i'm trying to do is to search for a list of all of the contacts (people) that work for these veterinary companies. These contacts don't have the "Veterinary" tag set on them - but their related companies do have the Veterinary tag set. If i search for "Customers", "persons" and Tag = Veterinary, the search doesn't return any records.

Our old CRM software was able to search contacts for fields and tags on the contact, and for fields and tags on the related companies. This functionality appears to be missing in Odoo.

Basically, what i want to be able to do is to recursively search for contacts based on fields and tags in the companies that they are related to.....

Avatar
Discard
Best Answer

Hi,

for example you tag is "Retail" means, you can search in the customer search view by using "Customers" ans in the advanced search you can use Tags contains Retail.Please check before your tag is created correctly

Avatar
Discard
Best Answer

Hello,

If you search for a company that has no custom field, your research won't give anything.

I would say, you have to create a custom "Related partners" text field that will have company names separated by commas for example.

Once you update the fields in your res_partner database, you will be able to search for companys that work with another company.

Best regards,

José

Avatar
Discard