2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 03:00:54 +00:00

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
2023-03-09 00:18:39 +11:00
committed by GitHub
parent 34875828d7
commit 2edb7f2b55
4 changed files with 90 additions and 1 deletions

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