How can I create a custom filter where the selection criteria are expressed across company contacts and person contacts? For example, I'd like to search for all person contacts who have a specific tag who are associated with company contacts that have a different specific tag. The result would be a list that contains only contacts that meet the individual and company search criteria.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
To verify the filter that is created (or to even manually create the expression) I'd suggest you to first enable the Developer mode (https://www.odoo.com/documentation/18.0/applications/general/developer_mode.html). Doing so you will see additional information when creating a filter.
Furthermore, I'd like to suggest you to save the created search (even if it's just partial one at that point) as a favorite. This way you can establish a base line filtering and work from there without constantly needing to rebuild the filter from scratch all the time.
That being said, a filter meeting your criteria could look like this:
["&", ("parent_id.category_id", "in", [10, 11]), ("category_id", "in", [8, 9])]
Note:
category_id 8 = 'abc'
category_id 9 = 'xyz'
category_id 10 = '123'
category_id 11 = '456'
The sample set of data looks like this:
With above filter, you're result will be:
Whether or not you want '=' (is equal) or 'has' (in) filters, depends on your exact requirement. But, given above Search Domain snippet (a Search Domain is a filter expression) you should be able to easily tweak it. You can also copy and paste it into the 'Code editor' field in the Custom Filter (when Developer Mode is active.
The UI version of this filter looks like this:
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
3
wrz 25
|
408 | ||
|
1
wrz 25
|
1834 | ||
|
0
lip 25
|
1088 | ||
Filters in multiple companies
Rozwiązane
|
|
1
maj 25
|
1781 | |
ADD PROPERTIES
Rozwiązane
|
|
1
maj 25
|
5186 |