mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Remove old tree classes
This commit is contained in:
parent
a792903a79
commit
4eea8c8193
@ -50,21 +50,6 @@ from InvenTree.api import AttachmentMixin
|
||||
from InvenTree.status_codes import BuildStatus
|
||||
|
||||
|
||||
class PartCategoryTree(TreeSerializer):
|
||||
|
||||
title = _("Parts")
|
||||
model = PartCategory
|
||||
|
||||
queryset = PartCategory.objects.all()
|
||||
|
||||
@property
|
||||
def root_url(self):
|
||||
return reverse('part-index')
|
||||
|
||||
def get_items(self):
|
||||
return PartCategory.objects.all().prefetch_related('parts', 'children')
|
||||
|
||||
|
||||
class CategoryList(generics.ListCreateAPIView):
|
||||
""" API endpoint for accessing a list of PartCategory objects.
|
||||
|
||||
@ -1332,7 +1317,6 @@ class BomItemSubstituteDetail(generics.RetrieveUpdateDestroyAPIView):
|
||||
|
||||
|
||||
part_api_urls = [
|
||||
url(r'^tree/?', PartCategoryTree.as_view(), name='api-part-tree'),
|
||||
|
||||
# Base URL for PartCategory API endpoints
|
||||
url(r'^category/', include([
|
||||
|
@ -48,22 +48,6 @@ from InvenTree.api import AttachmentMixin
|
||||
from InvenTree.filters import InvenTreeOrderingFilter
|
||||
|
||||
|
||||
class StockCategoryTree(TreeSerializer):
|
||||
title = _('Stock')
|
||||
model = StockLocation
|
||||
|
||||
@property
|
||||
def root_url(self):
|
||||
return reverse('stock-index')
|
||||
|
||||
def get_items(self):
|
||||
return StockLocation.objects.all().prefetch_related('stock_items', 'children')
|
||||
|
||||
permission_classes = [
|
||||
permissions.IsAuthenticated,
|
||||
]
|
||||
|
||||
|
||||
class StockDetail(generics.RetrieveUpdateDestroyAPIView):
|
||||
""" API detail endpoint for Stock object
|
||||
|
||||
@ -1105,8 +1089,6 @@ stock_api_urls = [
|
||||
url(r'^.*$', StockTrackingList.as_view(), name='api-stock-tracking-list'),
|
||||
])),
|
||||
|
||||
url(r'^tree/', StockCategoryTree.as_view(), name='api-stock-tree'),
|
||||
|
||||
# Detail for a single stock item
|
||||
url(r'^(?P<pk>\d+)/', StockDetail.as_view(), name='api-stock-detail'),
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user