2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 03:00:54 +00:00

Optionally add all SalesOrderAllocations to the SalesOrderLineItem serializer

This commit is contained in:
Oliver Walters
2020-04-22 20:10:23 +10:00
parent 5d1754ec32
commit b70e79b778
4 changed files with 51 additions and 5 deletions

View File

@ -17,18 +17,18 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
{% for allocation in item.sales_order_allocations.all %}
<div class='alert alert-block alert-info'>
{% trans "This stock item is allocated to Sales Order" %} <a href="{% url 'so-detail' allocation.line.order.id %}">#{{ allocation.line.order.id }}</a> ({% trans "Quantity" %}: {% decimal allocation.quantity %})
{% trans "This stock item is allocated to Sales Order" %} <a href="{% url 'so-detail' allocation.line.order.id %}"><b>#{{ allocation.line.order.reference }}</b></a> ({% trans "Quantity" %}: {% decimal allocation.quantity %})
</div>
{% endfor %}
{% for allocation in item.allocations.all %}
<div class='alert alert-block alert-info'>
{% trans "This stock item is allocated to Build" %} <a href="{% url 'build-detail' allocation.build.id %}">#{{ allocation.build.id }}</a> ({% trans "Quantity" %}: {% decimal allocation.quantity %})
{% trans "This stock item is allocated to Build" %} <a href="{% url 'build-detail' allocation.build.id %}"><b>#{{ allocation.build.id }}</b></a> ({% trans "Quantity" %}: {% decimal allocation.quantity %})
</div>
{% endfor %}
{% if item.serialized %}
<div class='alert alert-block alert-info'>
<div class='alert alert-block alert-warning'>
{% trans "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." %}
</div>
{% elif item.child_count > 0 %}