mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
List active purchase orders for each selected supplier
This commit is contained in:
parent
7049ab1d8c
commit
3f809a9001
@ -37,6 +37,11 @@
|
||||
id='id_purchase_order_{{ supplier.id }}'
|
||||
name='purchase_order_{{ supplier.id }}'>
|
||||
<option value=''>---------</option>
|
||||
{% for order in supplier.outstanding_purchase_orders %}
|
||||
<option value='{{ order.id }}'>
|
||||
{{ order }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -186,6 +186,10 @@ class OrderParts(AjaxView):
|
||||
supplier.order_items = []
|
||||
suppliers[supplier.name] = supplier
|
||||
|
||||
print("Supplier:", supplier.name)
|
||||
for order in supplier.outstanding_purchase_orders():
|
||||
print("order:", order.reference)
|
||||
|
||||
suppliers[supplier.name].order_items.append(part)
|
||||
|
||||
self.suppliers = [suppliers[key] for key in suppliers.keys()]
|
||||
|
Loading…
Reference in New Issue
Block a user