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 }}'
|
id='id_purchase_order_{{ supplier.id }}'
|
||||||
name='purchase_order_{{ supplier.id }}'>
|
name='purchase_order_{{ supplier.id }}'>
|
||||||
<option value=''>---------</option>
|
<option value=''>---------</option>
|
||||||
|
{% for order in supplier.outstanding_purchase_orders %}
|
||||||
|
<option value='{{ order.id }}'>
|
||||||
|
{{ order }}
|
||||||
|
</option>
|
||||||
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -185,6 +185,10 @@ class OrderParts(AjaxView):
|
|||||||
if not supplier.name in suppliers:
|
if not supplier.name in suppliers:
|
||||||
supplier.order_items = []
|
supplier.order_items = []
|
||||||
suppliers[supplier.name] = supplier
|
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)
|
suppliers[supplier.name].order_items.append(part)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user