2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 03:25:42 +00:00

Limit PO selection to only those which are PENDING

This commit is contained in:
Oliver Walters
2019-06-15 15:33:03 +10:00
parent 26f56c188b
commit 0fa8e3809e
2 changed files with 5 additions and 1 deletions

View File

@ -135,6 +135,10 @@ class Company(models.Model):
""" Return purchase orders which are 'outstanding' """
return self.purchase_orders.filter(status__in=OrderStatus.OPEN)
def pending_purchase_orders(self):
""" Return purchase orders which are PENDING (not yet issued) """
return self.purchase_orders.filter(status=OrderStatus.PENDING)
def closed_purchase_orders(self):
""" Return purchase orders which are not 'outstanding'