2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-09-13 14:11:37 +00:00

List filters (#10203)

* Add support for 'list' filtering

* Docs

* Add unit tests
This commit is contained in:
Oliver
2025-08-20 10:23:20 +10:00
committed by GitHub
parent b939e39ea2
commit e44008f528
4 changed files with 71 additions and 3 deletions

View File

@@ -100,6 +100,20 @@ If you enter an invalid option for the filter field, an error message will be di
!!! warning "Advanced Users"
Report filtering is an advanced topic, and requires a little bit of knowledge of the underlying data structure!
#### List Filtering
To filter a queryset against a list of ID values, you can use the following "list" syntax:
```
item__in=[1,2,3]
```
Note that:
- The list must be enclosed in square brackets `[]`
- The items in the list must be comma-separated
- The key must end with `__in` to indicate that it is a list filter (*note the double underscore*).
### Metadata
A JSON field made available to any [plugins](../plugins/index.md) - but not used by internal code.