diff --git a/InvenTree/stock/templates/stock/item_childs.html b/InvenTree/stock/templates/stock/item_childs.html
new file mode 100644
index 0000000000..1a8febbbea
--- /dev/null
+++ b/InvenTree/stock/templates/stock/item_childs.html
@@ -0,0 +1,42 @@
+{% extends "stock/item_base.html" %}
+
+{% load static %}
+{% load i18n %}
+
+{% block details %}
+
+{% include "stock/tabs.html" with tab='children' %}
+
+
+
+
{% trans "Child Stock Items" %}
+
+{% if item.child_count > 0 %}
+{% include "stock_table.html" %}
+{% else %}
+
+ {% trans "This stock item does not have any child items" %}
+
+{% endif %}
+
+{% endblock %}
+
+{% block js_ready %}
+{{ block.super }}
+
+{% if item.child_count > 0 %}
+loadStockTable($("#stock-table"), {
+ params: {
+ location_detail: true,
+ part_details: true,
+ ancestor: {{ item.id }},
+ },
+ groupByField: 'location',
+ buttons: [
+ '#stock-options',
+ ],
+ url: "{% url 'api-stock-list' %}",
+});
+{% endif %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/InvenTree/stock/templates/stock/tabs.html b/InvenTree/stock/templates/stock/tabs.html
index ac381a76ab..378f74e28e 100644
--- a/InvenTree/stock/templates/stock/tabs.html
+++ b/InvenTree/stock/templates/stock/tabs.html
@@ -4,6 +4,9 @@
{% trans "Tracking" %}
+
+ {% trans "Children" %}{% if item.child_count > 0 %}{{ item.child_count }}{% endif %}
+
{% if 0 %}
diff --git a/InvenTree/stock/tests.py b/InvenTree/stock/tests.py
index 2f840833a3..a866bdb880 100644
--- a/InvenTree/stock/tests.py
+++ b/InvenTree/stock/tests.py
@@ -156,7 +156,9 @@ class StockTest(TestCase):
# Move 6 of the units
self.assertTrue(w1.move(self.diningroom, 'Moved', None, quantity=6))
- self.assertEqual(w1.quantity, 6)
+
+ # There should be 4 remaining
+ self.assertEqual(w1.quantity, 4)
# There should also be a new object still in drawer3
self.assertEqual(StockItem.objects.filter(part=25).count(), 4)
@@ -175,17 +177,17 @@ class StockTest(TestCase):
N = StockItem.objects.filter(part=3).count()
stock = StockItem.objects.get(id=1234)
- stock.splitStock(1000, None)
+ stock.splitStock(1000, None, self.user)
self.assertEqual(stock.quantity, 234)
# There should be a new stock item too!
self.assertEqual(StockItem.objects.filter(part=3).count(), N + 1)
# Try to split a negative quantity
- stock.splitStock(-10, None)
+ stock.splitStock(-10, None, self.user)
self.assertEqual(StockItem.objects.filter(part=3).count(), N + 1)
- stock.splitStock(stock.quantity, None)
+ stock.splitStock(stock.quantity, None, self.user)
self.assertEqual(StockItem.objects.filter(part=3).count(), N + 1)
def test_stocktake(self):
@@ -325,6 +327,3 @@ class StockTest(TestCase):
# Serialize the remainder of the stock
item.serializeStock(2, [99, 100], self.user)
-
- # Two more items but the original has been deleted
- self.assertEqual(StockItem.objects.filter(part=25).count(), n + 9)
diff --git a/InvenTree/stock/urls.py b/InvenTree/stock/urls.py
index 50ac170ce3..f69dc8b63f 100644
--- a/InvenTree/stock/urls.py
+++ b/InvenTree/stock/urls.py
@@ -24,6 +24,7 @@ stock_item_detail_urls = [
url(r'^add_tracking/', views.StockItemTrackingCreate.as_view(), name='stock-tracking-create'),
+ url(r'^children/', views.StockItemDetail.as_view(template_name='stock/item_childs.html'), name='stock-item-children'),
url(r'^notes/', views.StockItemNotes.as_view(), name='stock-item-notes'),
url('^.*$', views.StockItemDetail.as_view(), name='stock-item-detail'),
diff --git a/docs/start.rst b/docs/start.rst
index 2cac8c6a95..1b389d7e5b 100644
--- a/docs/start.rst
+++ b/docs/start.rst
@@ -35,7 +35,7 @@ To configure Inventree inside a virtual environment, ``cd`` into the inventree b
``source inventree-env/bin/activate``
-This will place the current shell session inside a virtual environment - the terminal should display the ``(inventree)`` prefix.
+This will place the current shell session inside a virtual environment - the terminal should display the ``(inventree-env)`` prefix.
.. note::
Remember to run ``source inventree-env/bin/activate`` when starting each shell session, before running Inventree commands. This will ensure that the correct environment is being used.
diff --git a/requirements.txt b/requirements.txt
index 8edd16379e..4ce7c5d831 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
-Django==2.2.10 # Django package
+Django==2.2.9 # Django package
pillow==6.2.0 # Image manipulation
djangorestframework==3.10.3 # DRF framework
django-cors-headers==3.2.0 # CORS headers extension for DRF
@@ -18,4 +18,4 @@ flake8==3.3.0 # PEP checking
coverage==4.0.3 # Unit test coverage
python-coveralls==2.9.1 # Coveralls linking (for Travis)
fuzzywuzzy==0.17.0 # Fuzzy string matching
-python-Levenshtein==0.12.0 # Required for fuzzywuzzy
\ No newline at end of file
+python-Levenshtein==0.12.0 # Required for fuzzywuzzy