summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2012-08-06 22:21:44 +0200
committerSebastian Reichel <sre@ring0.de>2012-08-06 22:21:44 +0200
commit13476f388e2c5c7931b596192919912e72f2bf02 (patch)
treec331157a86db043b5f89a71c86494fb18d5d0ce8
parent08ce49cc1a61dac19669b7dbf5de5fe86e856c78 (diff)
downloadktt-inventory-system-13476f388e2c5c7931b596192919912e72f2bf02.tar.bz2
add supplier field in view
-rw-r--r--inventar/templates/item.html7
-rw-r--r--inventory/views.py1
2 files changed, 8 insertions, 0 deletions
diff --git a/inventar/templates/item.html b/inventar/templates/item.html
index d5c645b..8fa7a24 100644
--- a/inventar/templates/item.html
+++ b/inventar/templates/item.html
@@ -119,6 +119,13 @@
</td>
</tr>
+ {% if supplier %}
+ <tr class="{% cycle rowcolor %}">
+ <th><img src="/static/truck.svg" width="32" height="32" title="{% trans "Supplier" %}" alt="{% trans "Supplier" %}" /></th>
+ <td>{{ supplier }}</td>
+ </tr>
+ {% endif %}
+
{% if owner %}
<tr class="{% cycle rowcolor %}">
<th><img src="/static/owner.svg" width="32" height="32" title="{% trans "Owner" %}" alt="{% trans "Owner" %}" /></th>
diff --git a/inventory/views.py b/inventory/views.py
index e97bbaa..77630d3 100644
--- a/inventory/views.py
+++ b/inventory/views.py
@@ -44,6 +44,7 @@ def item(request, selectedid):
"name": p.item.name,
"codes": p.item.barcodes(),
"description": p.item.description,
+ "supplier": p.item.supplier,
"note": p.item.note,
"in_use": p.item.inUse,
"parent": p.item.parent,