mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-14 19:15:41 +00:00
Tree view now supports root URL link
This commit is contained in:
@ -6,6 +6,7 @@ from django_filters.rest_framework import FilterSet, DjangoFilterBackend
|
||||
from django_filters import NumberFilter
|
||||
|
||||
from django.conf.urls import url, include
|
||||
from django.urls import reverse
|
||||
from django.db.models import Q
|
||||
|
||||
from .models import StockLocation, StockItem
|
||||
@ -27,6 +28,10 @@ class StockCategoryTree(TreeSerializer):
|
||||
title = 'Stock'
|
||||
model = StockLocation
|
||||
|
||||
@property
|
||||
def root_url(self):
|
||||
return reverse('stock-index')
|
||||
|
||||
|
||||
class StockDetail(generics.RetrieveUpdateDestroyAPIView):
|
||||
""" API detail endpoint for Stock object
|
||||
|
Reference in New Issue
Block a user