Display a message if no stock location is set

This commit is contained in:
Oliver Walters 2020-05-30 20:58:05 +10:00
parent 55bfdc000b
commit 8459de7be2

View File

@ -144,11 +144,15 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
<td>{% trans "Build Order" %}</td> <td>{% trans "Build Order" %}</td>
<td><a href="{% url 'build-detail' item.build_order.id %}">{{ item.build_order }}</a></td> <td><a href="{% url 'build-detail' item.build_order.id %}">{{ item.build_order }}</a></td>
</tr> </tr>
{% elif item.location %} {% else %}
<tr> <tr>
<td><span class='fas fa-map-marker-alt'></span></td> <td><span class='fas fa-map-marker-alt'></span></td>
<td>{% trans "Location" %}</td> <td>{% trans "Location" %}</td>
{% if item.location %}
<td><a href="{% url 'stock-location-detail' item.location.id %}">{{ item.location.name }}</a></td> <td><a href="{% url 'stock-location-detail' item.location.id %}">{{ item.location.name }}</a></td>
{% else %}
<td>{% trans "No location set" %}</td>
{% endif %}
</tr> </tr>
{% endif %} {% endif %}
{% if item.uid %} {% if item.uid %}