mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-15 19:45:46 +00:00
Calculate parts on order for a Part / SupplierPart
This commit is contained in:
@ -806,6 +806,11 @@ class Part(models.Model):
|
||||
|
||||
return orders
|
||||
|
||||
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()])
|
||||
|
||||
|
||||
def attach_file(instance, filename):
|
||||
""" Function for storing a file for a PartAttachment
|
||||
|
Reference in New Issue
Block a user