mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-20 13:56:30 +00:00
Merge remote-tracking branch 'inventree/master'
This commit is contained in:
InvenTree
locale
cs
LC_MESSAGES
de
LC_MESSAGES
el
LC_MESSAGES
en
LC_MESSAGES
es
LC_MESSAGES
es_MX
LC_MESSAGES
fa
LC_MESSAGES
fr
LC_MESSAGES
he
LC_MESSAGES
hu
LC_MESSAGES
id
LC_MESSAGES
it
LC_MESSAGES
ja
LC_MESSAGES
ko
LC_MESSAGES
nl
LC_MESSAGES
no
LC_MESSAGES
pl
LC_MESSAGES
pt
LC_MESSAGES
pt_br
LC_MESSAGES
ru
LC_MESSAGES
sv
LC_MESSAGES
th
LC_MESSAGES
tr
LC_MESSAGES
vi
LC_MESSAGES
zh
LC_MESSAGES
stock
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -90,6 +90,8 @@ class StockMetadata(generics.RetrieveUpdateAPIView):
|
|||||||
class StockItemContextMixin:
|
class StockItemContextMixin:
|
||||||
"""Mixin class for adding StockItem object to serializer context."""
|
"""Mixin class for adding StockItem object to serializer context."""
|
||||||
|
|
||||||
|
queryset = StockItem.objects.none()
|
||||||
|
|
||||||
def get_serializer_context(self):
|
def get_serializer_context(self):
|
||||||
"""Extend serializer context."""
|
"""Extend serializer context."""
|
||||||
context = super().get_serializer_context()
|
context = super().get_serializer_context()
|
||||||
@ -106,7 +108,6 @@ class StockItemContextMixin:
|
|||||||
class StockItemSerialize(StockItemContextMixin, generics.CreateAPIView):
|
class StockItemSerialize(StockItemContextMixin, generics.CreateAPIView):
|
||||||
"""API endpoint for serializing a stock item."""
|
"""API endpoint for serializing a stock item."""
|
||||||
|
|
||||||
queryset = StockItem.objects.all()
|
|
||||||
serializer_class = StockSerializers.SerializeStockItemSerializer
|
serializer_class = StockSerializers.SerializeStockItemSerializer
|
||||||
|
|
||||||
|
|
||||||
@ -118,21 +119,18 @@ class StockItemInstall(StockItemContextMixin, generics.CreateAPIView):
|
|||||||
- stock_item must be serialized (and not belong to another item)
|
- stock_item must be serialized (and not belong to another item)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
queryset = StockItem.objects.all()
|
|
||||||
serializer_class = StockSerializers.InstallStockItemSerializer
|
serializer_class = StockSerializers.InstallStockItemSerializer
|
||||||
|
|
||||||
|
|
||||||
class StockItemUninstall(StockItemContextMixin, generics.CreateAPIView):
|
class StockItemUninstall(StockItemContextMixin, generics.CreateAPIView):
|
||||||
"""API endpoint for removing (uninstalling) items from this item."""
|
"""API endpoint for removing (uninstalling) items from this item."""
|
||||||
|
|
||||||
queryset = StockItem.objects.all()
|
|
||||||
serializer_class = StockSerializers.UninstallStockItemSerializer
|
serializer_class = StockSerializers.UninstallStockItemSerializer
|
||||||
|
|
||||||
|
|
||||||
class StockItemReturn(StockItemContextMixin, generics.CreateAPIView):
|
class StockItemReturn(StockItemContextMixin, generics.CreateAPIView):
|
||||||
"""API endpoint for returning a stock item from a customer"""
|
"""API endpoint for returning a stock item from a customer"""
|
||||||
|
|
||||||
queryset = StockItem.objects.all()
|
|
||||||
serializer_class = StockSerializers.ReturnStockItemSerializer
|
serializer_class = StockSerializers.ReturnStockItemSerializer
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user