mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-13 08:21:26 +00:00
Add API endpoint for StockItem attachment items
This commit is contained in:
@ -6,6 +6,7 @@ from rest_framework import serializers
|
||||
|
||||
from .models import StockItem, StockLocation
|
||||
from .models import StockItemTracking
|
||||
from .models import StockItemAttachment
|
||||
|
||||
from django.db.models import Sum, Count
|
||||
from django.db.models.functions import Coalesce
|
||||
@ -189,6 +190,20 @@ class LocationSerializer(InvenTreeModelSerializer):
|
||||
]
|
||||
|
||||
|
||||
class StockItemAttachmentSerializer(InvenTreeModelSerializer):
|
||||
""" Serializer for StockItemAttachment model """
|
||||
|
||||
class Meta:
|
||||
model = StockItemAttachment
|
||||
|
||||
fields = [
|
||||
'pk',
|
||||
'stock_item',
|
||||
'attachment',
|
||||
'comment'
|
||||
]
|
||||
|
||||
|
||||
class StockTrackingSerializer(InvenTreeModelSerializer):
|
||||
""" Serializer for StockItemTracking model """
|
||||
|
||||
|
Reference in New Issue
Block a user