Template tweaks

This commit is contained in:
Oliver 2021-11-04 00:44:16 +11:00
parent ee7c3ae066
commit 5542532223
3 changed files with 8 additions and 4 deletions

View File

@ -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):
"""

View File

@ -35,7 +35,7 @@
<td><span class='fas fa-sitemap'></span></td>
<td>{% trans "Category" %}</td>
<td>
<a href='{% url "category-detail" part.category.pk %}'>{{ part.category }}</a>
<a href='{% url "category-detail" part.category.pk %}'>{{ part.category.name }}</a>
</td>
</tr>
{% endif %}

View File

@ -147,8 +147,6 @@
</div>
</h4>
<!-- Part info messages -->
<div class='info-messages'>
{% if part.variant_of %}
@ -174,6 +172,13 @@
<td>{% trans "In Stock" %}</td>
<td>{% include "part/stock_count.html" %}</td>
</tr>
{% if part.minimum_stock %}
<tr>
<td><span class='fas fa-flag'></span></td>
<td>{% trans "Minimum Stock" %}</td>
<td>{{ part.minimum_stock }}</td>
</tr>
{% endif %}
{% if on_order > 0 %}
<tr>
<td><span class='fas fa-shopping-cart'></span></td>