From e9bf4b4ceff06d4d84e87a2553f2ec760b6a32d0 Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 12 Jul 2021 20:53:36 +1000 Subject: [PATCH] Add some more functionality to StockLocation page --- InvenTree/part/templates/part/part_base.html | 2 +- InvenTree/stock/templates/stock/location.html | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index 8e1b60b31b..391f6d1d35 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -63,7 +63,7 @@
  • - {% trans "Move part stock" %} + {% trans "Transfer part stock" %}
  • diff --git a/InvenTree/stock/templates/stock/location.html b/InvenTree/stock/templates/stock/location.html index 8230de473c..d70d9a44be 100644 --- a/InvenTree/stock/templates/stock/location.html +++ b/InvenTree/stock/templates/stock/location.html @@ -69,6 +69,12 @@ {% trans "Count stock" %} +
  • + + + {% trans "Transfer stock" %} + +
  • {% endif %} @@ -221,8 +227,8 @@ }); {% if location %} - $("#location-count").click(function() { + function adjustLocationStock(action) { inventreeGet( '{% url "api-stock-list" %}', { @@ -233,7 +239,7 @@ }, { success: function(items) { - adjustStock('count', items, { + adjustStock(action, items, { onSuccess: function() { location.reload(); } @@ -241,6 +247,14 @@ } } ); + } + + $("#location-count").click(function() { + adjustLocationStock('count'); + }); + + $("#location-move").click(function() { + adjustLocationStock('move'); }); $('#print-label').click(function() {