2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-06 21:50:55 +00:00

[UI] Refactor stock adjustment actions (#9937)

* Refactor stock actions into a hook

* Cleanup hooks

* Allow transfer of "incomplete" outputs

* Simplify even further

* Enable transfer of stock allocated to build order

* Remove StockItemBriefSerializer entirely

* stock actions for items allocated to sales order

* Refactor <PartDetail> page

* Refactor <StockDetail>

* Refactor <LocationDetail>

* Bump API version

* Control serializer arguments
This commit is contained in:
Oliver
2025-07-03 16:15:06 +10:00
committed by GitHub
parent 5e9a8f7cb2
commit d9f71ca20f
2 changed files with 15 additions and 2 deletions

View File

@ -1228,7 +1228,14 @@ class BuildItemSerializer(DataImportExportSerializerMixin, InvenTreeModelSeriali
)
stock_item_detail = StockItemSerializer(
source='stock_item', read_only=True, allow_null=True, label=_('Stock Item')
source='stock_item',
read_only=True,
allow_null=True,
label=_('Stock Item'),
part_detail=False,
location_detail=False,
supplier_part_detail=False,
path_detail=False,
)
location = serializers.PrimaryKeyRelatedField(

View File

@ -1431,7 +1431,13 @@ class SalesOrderAllocationSerializer(InvenTreeModelSerializer):
source='item.part', many=False, read_only=True, allow_null=True
)
item_detail = stock.serializers.StockItemSerializer(
source='item', many=False, read_only=True, allow_null=True
source='item',
many=False,
read_only=True,
allow_null=True,
part_detail=False,
location_detail=False,
supplier_part_detail=False,
)
location_detail = stock.serializers.LocationBriefSerializer(
source='item.location', many=False, read_only=True, allow_null=True