mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-07 12:22:11 +00:00
Tweak the 'on_order' calculation
This commit is contained in:
@@ -809,7 +809,7 @@ class Part(models.Model):
|
||||
def on_order(self):
|
||||
""" Return the total number of items on order for this part. """
|
||||
|
||||
return sum([part.on_order() for part in self.supplier_parts.all()])
|
||||
return sum([part.on_order() for part in self.supplier_parts.all().prefetch_related('purchase_order_line_items')])
|
||||
|
||||
|
||||
def attach_file(instance, filename):
|
||||
|
Reference in New Issue
Block a user