From 47a4ab2ed88bb2072296ddcae2f34f8eadb24f7e Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 26 May 2020 11:38:17 +1000 Subject: [PATCH] Template changes --- InvenTree/part/templates/part/part_base.html | 7 +++++-- InvenTree/part/templates/part/tabs.html | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index 0bb3687fc8..d9f80edf44 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -6,11 +6,14 @@ {% block content %} +{% if part.virtual %} +
+ {% trans "This part is a virtual part" %} +
+{% endif %} {% if part.is_template %}
{% trans "This part is a template part." %} -
- {% trans "It is not a real part, but real parts can be based on this template." %}
{% endif %} {% if part.variant_of %} diff --git a/InvenTree/part/templates/part/tabs.html b/InvenTree/part/templates/part/tabs.html index 28aa2cbb4d..ecec2796d6 100644 --- a/InvenTree/part/templates/part/tabs.html +++ b/InvenTree/part/templates/part/tabs.html @@ -13,9 +13,11 @@ {% trans "Variants" %} {{ part.variants.count }} {% endif %} + {% if not part.virtual %} {% trans "Stock" %} {% decimal part.total_stock %} + {% endif %} {% if part.component or part.used_in_count > 0 %} {% trans "Allocated" %} {% decimal part.allocation_count %}