Adds "stock value" calculation to stock table (#4471)

* Add part pricing data to stockitem list serializer

* Add "stock value" column to stock list table
This commit is contained in:
Oliver authored and GitHub committed 2023-03-09 00:18:39 +11:00
1 parent 34875828d7
commit 2edb7f2b55
4 files changed
+90 -1

No files matched your search

+2
View File
@@ -165,6 +165,8 @@ class StockItemSerializer(InvenTree.serializers.InvenTreeModelSerializer):
queryset = queryset.prefetch_related(
'sales_order',
'purchase_order',
'part',
'part__pricing_data',
)
# Annotate the queryset with the total allocated to sales orders