diff --git a/src/backend/InvenTree/order/api.py b/src/backend/InvenTree/order/api.py index 61bd065039..42e15d47b6 100644 --- a/src/backend/InvenTree/order/api.py +++ b/src/backend/InvenTree/order/api.py @@ -68,9 +68,9 @@ class GeneralExtraLineList(DataExportViewMixin): filter_backends = SEARCH_ORDER_FILTER - ordering_fields = ['quantity', 'note', 'reference'] + ordering_fields = ['quantity', 'notes', 'reference'] - search_fields = ['quantity', 'note', 'reference', 'description'] + search_fields = ['quantity', 'notes', 'reference', 'description'] filterset_fields = ['order'] diff --git a/src/backend/InvenTree/stock/api.py b/src/backend/InvenTree/stock/api.py index e0db540b15..2b7e8049ab 100644 --- a/src/backend/InvenTree/stock/api.py +++ b/src/backend/InvenTree/stock/api.py @@ -1461,7 +1461,7 @@ class StockTrackingList(DataExportViewMixin, ListAPI): ordering_fields = ['date'] - search_fields = ['title', 'notes'] + search_fields = ['notes'] class LocationDetail(CustomRetrieveUpdateDestroyAPI): diff --git a/src/backend/InvenTree/stock/test_api.py b/src/backend/InvenTree/stock/test_api.py index d856b72b5d..8ad3fa451c 100644 --- a/src/backend/InvenTree/stock/test_api.py +++ b/src/backend/InvenTree/stock/test_api.py @@ -2150,6 +2150,11 @@ class StockTrackingTest(StockAPITestCase): response = self.get(url, {'limit': 1}) self.assertEqual(response.data['count'], N) + # Test with search and pagination + response = self.get(url, {'limit': 1, 'offset': 10, 'search': 'berries'}) + + self.assertEqual(response.data['count'], 0) + def test_list(self): """Test list endpoint.""" url = self.get_url()