From 55425322232835ead9ba419bb8e0023091c314ce Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 4 Nov 2021 00:44:16 +1100 Subject: [PATCH] Template tweaks --- InvenTree/part/models.py | 1 - InvenTree/part/templates/part/detail.html | 2 +- InvenTree/part/templates/part/part_base.html | 9 +++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/InvenTree/part/models.py b/InvenTree/part/models.py index a3c294ea17..1c50bc321e 100644 --- a/InvenTree/part/models.py +++ b/InvenTree/part/models.py @@ -2094,7 +2094,6 @@ class Part(MPTTModel): return self.total_stock <= self.minimum_stock - @receiver(post_save, sender=Part, dispatch_uid='part_post_save_log') def after_save_part(sender, instance: Part, **kwargs): """ diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html index d3da4df514..706bf5e329 100644 --- a/InvenTree/part/templates/part/detail.html +++ b/InvenTree/part/templates/part/detail.html @@ -35,7 +35,7 @@ {% trans "Category" %} - {{ part.category }} + {{ part.category.name }} {% endif %} diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index a4087a3ece..bb7aea3abb 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -147,8 +147,6 @@ - -
{% if part.variant_of %} @@ -174,6 +172,13 @@ {% trans "In Stock" %} {% include "part/stock_count.html" %} + {% if part.minimum_stock %} + + + {% trans "Minimum Stock" %} + {{ part.minimum_stock }} + + {% endif %} {% if on_order > 0 %}