From 9d89db34b27e744817d7a8442115015023c8d826 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 15 Apr 2018 20:10:49 +1000 Subject: [PATCH 1/3] Improvements to stock page - Fixed URL / view (use class views) - Better slug lookup - Better table rendering using ol' mate bootstrap --- InvenTree/part/templates/part/bom.html | 2 +- InvenTree/part/templates/part/stock.html | 2 +- InvenTree/part/templates/part/supplier.html | 8 +- InvenTree/part/templates/part/tabs.html | 3 + InvenTree/part/templates/part/track.html | 2 +- InvenTree/part/templates/part/used_in.html | 2 +- InvenTree/part/views.py | 2 +- InvenTree/stock/forms.py | 51 +++++++++ InvenTree/stock/templates/stock/detail.html | 21 ---- InvenTree/stock/templates/stock/index.html | 34 +----- InvenTree/stock/templates/stock/item.html | 48 ++++++++ InvenTree/stock/templates/stock/loc_link.html | 6 +- InvenTree/stock/templates/stock/location.html | 17 +++ .../stock/templates/stock/location_list.html | 6 + .../stock/templates/stock/stock_table.html | 18 +++ InvenTree/stock/urls.py | 28 ++++- InvenTree/stock/views.py | 108 +++++++++++++----- 17 files changed, 264 insertions(+), 94 deletions(-) create mode 100644 InvenTree/stock/forms.py delete mode 100644 InvenTree/stock/templates/stock/detail.html create mode 100644 InvenTree/stock/templates/stock/item.html create mode 100644 InvenTree/stock/templates/stock/location.html create mode 100644 InvenTree/stock/templates/stock/location_list.html create mode 100644 InvenTree/stock/templates/stock/stock_table.html diff --git a/InvenTree/part/templates/part/bom.html b/InvenTree/part/templates/part/bom.html index a15994c488..f3db81216f 100644 --- a/InvenTree/part/templates/part/bom.html +++ b/InvenTree/part/templates/part/bom.html @@ -4,7 +4,7 @@ {% include 'part/tabs.html' with tab='bom' %} - +
diff --git a/InvenTree/part/templates/part/stock.html b/InvenTree/part/templates/part/stock.html index aa5c099abb..49fbb9736a 100644 --- a/InvenTree/part/templates/part/stock.html +++ b/InvenTree/part/templates/part/stock.html @@ -8,7 +8,7 @@ Total in stock: {{ part.stock }}
-
Part Description
+
diff --git a/InvenTree/part/templates/part/supplier.html b/InvenTree/part/templates/part/supplier.html index aa20f447a7..e6a26c3781 100644 --- a/InvenTree/part/templates/part/supplier.html +++ b/InvenTree/part/templates/part/supplier.html @@ -5,7 +5,7 @@ {% include 'part/tabs.html' with tab='suppliers' %} {% if part.supplier_parts.all|length > 0 %} -
Quantity Location
+
@@ -15,7 +15,11 @@ - + {% endfor %}
Supplier SKU
{{ spart.supplier.name }} {{ spart.SKU }}{{ spart.URL }} + {% if spart.URL %} + {{ spart.URL }} + {% endif %} +
diff --git a/InvenTree/part/templates/part/tabs.html b/InvenTree/part/templates/part/tabs.html index a81a98398c..1c244c40b2 100644 --- a/InvenTree/part/templates/part/tabs.html +++ b/InvenTree/part/templates/part/tabs.html @@ -1,6 +1,9 @@