diff --git a/InvenTree/part/serializers.py b/InvenTree/part/serializers.py index 36be5de6db..eaea7ecebc 100644 --- a/InvenTree/part/serializers.py +++ b/InvenTree/part/serializers.py @@ -100,8 +100,10 @@ class PartSerializer(InvenTreeModelSerializer): 'assembly', 'component', 'trackable', + 'purchaseable', 'salable', 'active', + 'virtual', ] diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html index 63a79bc0c7..97c5d97c42 100644 --- a/InvenTree/part/templates/part/detail.html +++ b/InvenTree/part/templates/part/detail.html @@ -13,16 +13,16 @@
@@ -102,40 +102,59 @@Template | -{% include "slide.html" with state=part.is_template %} | -Part is used as a template for other parts | -|||
Virtual | -{% include "slide.html" with state=part.virtual %} | -Part is virtual (not a physical part) | +{% include "slide.html" with state=part.virtual field='virtual' %} | + {% if part.virtual %} +Part is virtual (not a physical part) | + {% else %} +Part is not a virtual part | + {% endif %}
Assembly | -{% include "slide.html" with state=part.assembly %} | -Part can be assembled from other parts | +{% include "slide.html" with state=part.assembly field='assembly' %} | + {% if part.assembly %} +Part can be assembled from other parts | + {% else %} +Part cannot be assembled from other parts | + {% endif %}
Component | -{% include "slide.html" with state=part.component %} | -Part can be used in assemblies | +{% include "slide.html" with state=part.component field='component' %} | + {% if part.component %} +Part can be used in assemblies | + {% else %} +Part cannot be used in assemblies | + {% endif %}
Trackable | -{% include "slide.html" with state=part.trackable %} | -Part stock will be tracked by (serial or batch) | +{% include "slide.html" with state=part.trackable field='trackable' %} | + {% if part.trackable %} +Part stock will be tracked by (serial or batch) | + {% else %} +Part stock will not be tracked by | + {% endif %}
Purchaseable | -{% include "slide.html" with state=part.purchaseable %} | +{% include "slide.html" with state=part.purchaseable field='purchaseable' %} | + {% if part.purchaseable %} +Part can be purchased from external suppliers | + {% endif %}||
Sellable | -{% include "slide.html" with state=part.salable %} | -Part can be sold to customers | +{% include "slide.html" with state=part.salable field='salable' %} | + {% if part.salable %} +Part can be sold to customers | + {% else %} +Part cannot be sold to customers | + {% endif %}