mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Added category 'default_location' to serializer
This commit is contained in:
parent
eb98496a79
commit
3143242d13
@ -2,30 +2,20 @@
|
|||||||
JSON serializers for Part app
|
JSON serializers for Part app
|
||||||
"""
|
"""
|
||||||
import imghdr
|
import imghdr
|
||||||
|
|
||||||
from rest_framework import serializers
|
|
||||||
|
|
||||||
from .models import Part, PartStar
|
|
||||||
|
|
||||||
from .models import PartCategory
|
|
||||||
from .models import BomItem
|
|
||||||
from .models import PartParameter, PartParameterTemplate
|
|
||||||
from .models import PartAttachment
|
|
||||||
from .models import PartTestTemplate
|
|
||||||
from .models import PartSellPriceBreak
|
|
||||||
|
|
||||||
from stock.models import StockItem
|
|
||||||
|
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
|
||||||
from sql_util.utils import SubquerySum, SubqueryCount
|
|
||||||
|
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.db.models.functions import Coalesce
|
from django.db.models.functions import Coalesce
|
||||||
|
from InvenTree.serializers import (InvenTreeAttachmentSerializerField,
|
||||||
|
InvenTreeModelSerializer)
|
||||||
|
from InvenTree.status_codes import BuildStatus, PurchaseOrderStatus
|
||||||
|
from rest_framework import serializers
|
||||||
|
from sql_util.utils import SubqueryCount, SubquerySum
|
||||||
|
from stock.models import StockItem
|
||||||
|
|
||||||
from InvenTree.status_codes import PurchaseOrderStatus, BuildStatus
|
from .models import (BomItem, Part, PartAttachment, PartCategory,
|
||||||
from InvenTree.serializers import InvenTreeModelSerializer
|
PartParameter, PartParameterTemplate, PartSellPriceBreak,
|
||||||
from InvenTree.serializers import InvenTreeAttachmentSerializerField
|
PartStar, PartTestTemplate)
|
||||||
|
|
||||||
|
|
||||||
class CategorySerializer(InvenTreeModelSerializer):
|
class CategorySerializer(InvenTreeModelSerializer):
|
||||||
@ -41,6 +31,7 @@ class CategorySerializer(InvenTreeModelSerializer):
|
|||||||
'pk',
|
'pk',
|
||||||
'name',
|
'name',
|
||||||
'description',
|
'description',
|
||||||
|
'default_location',
|
||||||
'pathstring',
|
'pathstring',
|
||||||
'url',
|
'url',
|
||||||
'parent',
|
'parent',
|
||||||
|
Loading…
Reference in New Issue
Block a user