diff --git a/InvenTree/InvenTree/static/css/inventree.css b/InvenTree/InvenTree/static/css/inventree.css
index e3191405d9..0aab04f941 100644
--- a/InvenTree/InvenTree/static/css/inventree.css
+++ b/InvenTree/InvenTree/static/css/inventree.css
@@ -901,6 +901,15 @@ input[type="submit"] {
color: #e00;
}
+.info-messages {
+ padding: 5px;
+}
+
+.info-messages .alert {
+ padding: 5px;
+ margin-bottom: 10px;
+}
+
.part-allocation {
padding: 3px 10px;
border: 1px solid #ccc;
diff --git a/InvenTree/build/templates/build/build_base.html b/InvenTree/build/templates/build/build_base.html
index 177fad8d6c..2376daf0cf 100644
--- a/InvenTree/build/templates/build/build_base.html
+++ b/InvenTree/build/templates/build/build_base.html
@@ -9,44 +9,54 @@
{% inventree_title %} | {% trans "Build Order" %} - {{ build }}
{% endblock %}
+{% block below_thumbnail %}
+
+
+ {% if build.sales_order %}
+
+ {% object_link 'so-detail' build.sales_order.id build.sales_order as link %}
+ {% blocktrans %}This Build Order is allocated to Sales Order {{link}}{% endblocktrans %}
+
+ {% endif %}
+
+ {% if build.parent %}
+
+ {% object_link 'build-detail' build.parent.id build.parent as link %}
+ {% blocktrans %}This Build Order is a child of Build Order {{link}}{% endblocktrans %}
+
+ {% endif %}
+
+ {% if build.active %}
+ {% if build.can_complete %}
+
+ {% trans "Build Order is ready to mark as completed" %}
+
+ {% endif %}
+ {% if build.incomplete_count > 0 %}
+
+ {% trans "Build Order cannot be completed as outstanding outputs remain" %}
+
+ {% endif %}
+ {% if build.completed < build.quantity %}
+
+ {% trans "Required build quantity has not yet been completed" %}
+
+ {% endif %}
+ {% if not build.areUntrackedPartsFullyAllocated %}
+
+ {% trans "Stock has not been fully allocated to this Build Order" %}
+
+ {% endif %}
+ {% endif %}
+
+{% endblock %}
+
{% block header_pre_content %}
-{% if build.sales_order %}
-
- {% object_link 'so-detail' build.sales_order.id build.sales_order as link %}
- {% blocktrans %}This Build Order is allocated to Sales Order {{link}}{% endblocktrans %}
-
-{% endif %}
-{% if build.parent %}
-
- {% object_link 'build-detail' build.parent.id build.parent as link %}
- {% blocktrans %}This Build Order is a child of Build Order {{link}}{% endblocktrans %}
-
-{% endif %}
+
{% endblock %}
{% block header_post_content %}
-{% if build.active %}
-{% if build.can_complete %}
-
- {% trans "Build Order is ready to mark as completed" %}
-
-{% endif %}
-{% if build.incomplete_count > 0 %}
-
- {% trans "Build Order cannot be completed as outstanding outputs remain" %}
-
-{% endif %}
-{% if build.completed < build.quantity %}
-
- {% trans "Required build quantity has not yet been completed" %}
-
-{% endif %}
-{% if not build.areUntrackedPartsFullyAllocated %}
-
- {% trans "Stock has not been fully allocated to this Build Order" %}
-
-{% endif %}
-{% endif %}
+
{% endblock %}
{% block thumbnail %}
diff --git a/InvenTree/order/templates/order/sales_order_base.html b/InvenTree/order/templates/order/sales_order_base.html
index 45bcc76244..d3f4ba74a2 100644
--- a/InvenTree/order/templates/order/sales_order_base.html
+++ b/InvenTree/order/templates/order/sales_order_base.html
@@ -9,13 +9,15 @@
{% inventree_title %} | {% trans "Sales Order" %}
{% endblock %}
-{% block pre_content %}
-{% if order.status == SalesOrderStatus.PENDING and not order.is_fully_allocated %}
-
- {% trans "This SalesOrder has not been fully allocated" %}
+{% block below_thumbnail %}
+
+ {% if order.status == SalesOrderStatus.PENDING and not order.is_fully_allocated %}
+
+ {% trans "This Sales Order has not been fully allocated" %}
+
+ {% endif %}
-{% endif %}
-{% endblock %}
+ {% endblock %}
{% block thumbnail %}
-{% if part.variant_of %}
-
- {% object_link 'part-variants' part.variant_of.id part.variant_of.full_name as link %}
- {% blocktrans %}This part is a variant of {{link}}{% endblocktrans %}
-
-{% endif %}
-
{% include "part/part_thumb.html" %}
@@ -107,6 +100,15 @@
+
+
+ {% if part.variant_of %}
+
+ {% object_link 'part-variants' part.variant_of.id part.variant_of.full_name as link %}
+ {% blocktrans %}This part is a variant of {{link}}{% endblocktrans %}
+
+ {% endif %}
+
diff --git a/InvenTree/stock/api.py b/InvenTree/stock/api.py
index 376d04f643..3fc440cae4 100644
--- a/InvenTree/stock/api.py
+++ b/InvenTree/stock/api.py
@@ -1018,6 +1018,9 @@ class StockTrackingList(generics.ListAPIView):
for item in data:
deltas = item['deltas']
+ if not deltas:
+ deltas = {}
+
# Add location detail
if 'location' in deltas:
try:
diff --git a/InvenTree/stock/templates/stock/item_base.html b/InvenTree/stock/templates/stock/item_base.html
index 54d6b12e4f..da770bab48 100644
--- a/InvenTree/stock/templates/stock/item_base.html
+++ b/InvenTree/stock/templates/stock/item_base.html
@@ -14,68 +14,6 @@
{% block pre_content %}
{% include 'stock/loc_link.html' with location=item.location %}
-
-{% setting_object 'STOCK_OWNERSHIP_CONTROL' as owner_control %}
-{% if owner_control.value == "True" %}
- {% authorized_owners item.owner as owners %}
-
- {% if not user in owners and not user.is_superuser %}
-
- {% trans "You are not in the list of owners of this item. This stock item cannot be edited." %}
-
- {% endif %}
-{% endif %}
-
-{% if item.is_building %}
-
- {% trans "This stock item is in production and cannot be edited." %}
- {% trans "Edit the stock item from the build view." %}
-
- {% if item.build %}
-
- {{ item.build }}
-
- {% endif %}
-
-
-{% endif %}
-
-{% if item.hasRequiredTests and not item.passedAllRequiredTests %}
-
- {% trans "This stock item has not passed all required tests" %}
-
-{% endif %}
-
-{% for allocation in item.sales_order_allocations.all %}
-
- {% object_link 'so-detail' allocation.line.order.id allocation.line.order as link %}
- {% decimal allocation.quantity as qty %}
- {% blocktrans %}This stock item is allocated to Sales Order {{ link }} (Quantity: {{ qty }}){% endblocktrans %}
-
-{% endfor %}
-
-{% for allocation in item.allocations.all %}
-
- {% object_link 'build-detail' allocation.build.id allocation.build %}
- {% decimal allocation.quantity as qty %}
- {% blocktrans %}This stock item is allocated to Build {{ link }} (Quantity: {{ qty }}){% endblocktrans %}
-
-{% endfor %}
-
-{% if item.serialized %}
-
- {% trans "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." %}
-
-{% elif item.child_count > 0 %}
-
- {% trans "This stock item cannot be deleted as it has child items" %}
-
-{% elif item.delete_on_deplete and item.can_delete %}
-
- {% trans "This stock item will be automatically deleted when all stock is depleted." %}
-
-{% endif %}
-
{% endblock %}
{% block thumbnail %}
@@ -221,6 +159,73 @@
{% endblock %}
+{% block below_thumbnail %}
+
+
+ {% setting_object 'STOCK_OWNERSHIP_CONTROL' as owner_control %}
+ {% if owner_control.value == "True" %}
+ {% authorized_owners item.owner as owners %}
+
+ {% if not user in owners and not user.is_superuser %}
+
+ {% trans "You are not in the list of owners of this item. This stock item cannot be edited." %}
+
+ {% endif %}
+ {% endif %}
+
+ {% if item.is_building %}
+
+ {% trans "This stock item is in production and cannot be edited." %}
+ {% trans "Edit the stock item from the build view." %}
+
+ {% if item.build %}
+
+ {{ item.build }}
+
+ {% endif %}
+
+
+ {% endif %}
+
+ {% if item.hasRequiredTests and not item.passedAllRequiredTests %}
+
+ {% trans "This stock item has not passed all required tests" %}
+
+ {% endif %}
+
+ {% for allocation in item.sales_order_allocations.all %}
+
+ {% object_link 'so-detail' allocation.line.order.id allocation.line.order as link %}
+ {% decimal allocation.quantity as qty %}
+ {% blocktrans %}This stock item is allocated to Sales Order {{ link }} (Quantity: {{ qty }}){% endblocktrans %}
+
+ {% endfor %}
+
+ {% for allocation in item.allocations.all %}
+
+ {% object_link 'build-detail' allocation.build.id allocation.build %}
+ {% decimal allocation.quantity as qty %}
+ {% blocktrans %}This stock item is allocated to Build {{ link }} (Quantity: {{ qty }}){% endblocktrans %}
+
+ {% endfor %}
+
+ {% if item.serialized %}
+
+ {% trans "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." %}
+
+ {% elif item.child_count > 0 %}
+
+ {% trans "This stock item cannot be deleted as it has child items" %}
+
+ {% elif item.delete_on_deplete and item.can_delete %}
+
+ {% trans "This stock item will be automatically deleted when all stock is depleted." %}
+
+ {% endif %}
+
+
+{% endblock %}
+
{% block page_details %}
{% trans "Stock Item Details" %}
diff --git a/InvenTree/templates/js/stock.js b/InvenTree/templates/js/stock.js
index 8f06d403ee..b89cceea83 100644
--- a/InvenTree/templates/js/stock.js
+++ b/InvenTree/templates/js/stock.js
@@ -1017,6 +1017,11 @@ function loadStockTrackingTable(table, options) {
formatter: function(details, row, index, field) {
var html = ``;
+ if (!details) {
+ html += '
';
+ return html;
+ }
+
// Location information
if (details.location) {
diff --git a/InvenTree/templates/two_column.html b/InvenTree/templates/two_column.html
index ce91dcfffb..1eb1b5388e 100644
--- a/InvenTree/templates/two_column.html
+++ b/InvenTree/templates/two_column.html
@@ -27,6 +27,8 @@
{% endblock %}
+ {% block below_thumbnail %}
+ {% endblock %}
{% block page_details %}