mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge remote-tracking branch 'inventree/master'
This commit is contained in:
commit
d0b3e0bd7c
@ -18,7 +18,7 @@
|
||||
<a href="{% url 'part-stock' part.id %}">{% trans "Stock" %} <span class="badge">{% decimal part.total_stock %}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if part.component or part.used_in_count > 0 %}
|
||||
{% if part.component or part.salable or part.used_in_count > 0 %}
|
||||
<li{% ifequal tab 'allocation' %} class="active"{% endifequal %}>
|
||||
<a href="{% url 'part-allocation' part.id %}">{% trans "Allocated" %} <span class="badge">{% decimal part.allocation_count %}</span></a>
|
||||
</li>
|
||||
|
@ -74,6 +74,6 @@ class BarcodePlugin(plugin.InvenTreePlugin):
|
||||
Use the existing serializer to do this
|
||||
"""
|
||||
|
||||
serializer = StockItemSerializer(item, part_detail=True, location_detail=True, supplier_detail=True)
|
||||
serializer = StockItemSerializer(item, part_detail=True, location_detail=True, supplier_part_detail=True)
|
||||
|
||||
return serializer.data
|
||||
|
@ -104,10 +104,10 @@ class StockItemSerializer(InvenTreeModelSerializer):
|
||||
location_detail = LocationBriefSerializer(source='location', many=False, read_only=True)
|
||||
supplier_part_detail = SupplierPartSerializer(source='supplier_part', many=False, read_only=True)
|
||||
|
||||
tracking_items = serializers.IntegerField()
|
||||
tracking_items = serializers.IntegerField(source='tracking_info_count')
|
||||
|
||||
quantity = serializers.FloatField()
|
||||
allocated = serializers.FloatField()
|
||||
allocated = serializers.FloatField(source='allocation_count')
|
||||
|
||||
required_tests = serializers.IntegerField(source='required_test_count', read_only=True)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user