mirror of
https://github.com/inventree/InvenTree.git
synced 2026-08-10 15:36:17 +00:00
Filtering for report snippets (#12487)
* Filtering for report snippets * Bump API version
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
"""InvenTree API version information."""
|
||||
|
||||
# InvenTree API version
|
||||
INVENTREE_API_VERSION = 529
|
||||
INVENTREE_API_VERSION = 530
|
||||
"""Increment this API version number whenever there is a significant change to the API that any clients need to know about."""
|
||||
|
||||
INVENTREE_API_TEXT = """
|
||||
|
||||
v530 -> 2026-07-28 : https://github.com/inventree/InvenTree/pull/12487
|
||||
- Adds searching against ReportSnippet API endpoint
|
||||
|
||||
v529 -> 2026-07-26 : https://github.com/inventree/InvenTree/pull/12471
|
||||
- Adds "on_order" filter to the Part API
|
||||
- Enable sorting by "ordering" quantity on the Part API endpoint
|
||||
|
||||
@@ -356,6 +356,8 @@ class ReportSnippetList(TemplatePermissionMixin, ListCreateAPI):
|
||||
|
||||
queryset = report.models.ReportSnippet.objects.all()
|
||||
serializer_class = report.serializers.ReportSnippetSerializer
|
||||
filter_backends = SEARCH_ORDER_FILTER
|
||||
search_fields = ['snippet', 'description']
|
||||
|
||||
|
||||
class ReportSnippetDetail(TemplatePermissionMixin, RetrieveUpdateDestroyAPI):
|
||||
|
||||
@@ -231,8 +231,6 @@ export default function SnippetTable() {
|
||||
props={{
|
||||
rowActions: rowActions,
|
||||
tableActions: tableActions,
|
||||
enableSearch: false,
|
||||
enableFilters: false,
|
||||
onRowClick: (record) => openDetailDrawer(record.pk)
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user