diff --git a/InvenTree/build/api.py b/InvenTree/build/api.py index 3ef0b2b1c8..71b806314f 100644 --- a/InvenTree/build/api.py +++ b/InvenTree/build/api.py @@ -100,6 +100,8 @@ class BuildList(APIDownloadMixin, ListCreateAPI): 'reference': ['reference_int', 'reference'], } + ordering = '-reference' + search_fields = [ 'reference', 'title', diff --git a/InvenTree/order/api.py b/InvenTree/order/api.py index 0a625a89c3..e15aa0dcd0 100644 --- a/InvenTree/order/api.py +++ b/InvenTree/order/api.py @@ -292,7 +292,7 @@ class PurchaseOrderList(APIDownloadMixin, ListCreateAPI): 'status', ] - ordering = '-creation_date' + ordering = '-reference' class PurchaseOrderDetail(RetrieveUpdateDestroyAPI): @@ -733,7 +733,7 @@ class SalesOrderList(APIDownloadMixin, ListCreateAPI): 'customer_reference', ] - ordering = '-creation_date' + ordering = '-reference' class SalesOrderDetail(RetrieveUpdateDestroyAPI):