mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Limit PO selection to only those which are PENDING
This commit is contained in:
parent
26f56c188b
commit
0fa8e3809e
@ -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'
|
||||
|
||||
|
@ -53,7 +53,7 @@
|
||||
id='id-purchase-order-{{ supplier.id }}'
|
||||
name='purchase-order-{{ supplier.id }}'>
|
||||
<option value=''>---------</option>
|
||||
{% for order in supplier.outstanding_purchase_orders %}
|
||||
{% for order in supplier.pending_purchase_orders %}
|
||||
<option value='{{ order.id }}'{% if supplier.selected_purchase_order == order.id %} selected='selected'{% endif %}>
|
||||
{{ order }}
|
||||
</option>
|
||||
|
Loading…
Reference in New Issue
Block a user