From dae45875fbd1352b50c6d78cde313196ea6a4493 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 26 Mar 2020 14:46:23 +1100 Subject: [PATCH] Add 'on_order' quantity to the part list API --- InvenTree/part/api.py | 1 + 1 file changed, 1 insertion(+) diff --git a/InvenTree/part/api.py b/InvenTree/part/api.py index a121553409..d24f0dc6ee 100644 --- a/InvenTree/part/api.py +++ b/InvenTree/part/api.py @@ -172,6 +172,7 @@ class PartList(generics.ListCreateAPIView): 'active', ).annotate( in_stock=Sum('stock_items__quantity'), + on_order=Sum('supplier_parts__purchase_order_line_items__quantity'), ) # TODO - Annotate total being built