mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add stock information for top-level stock page
This commit is contained in:
parent
b876d31d09
commit
3e2a5263a5
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-09-26 00:37+0000\n"
|
||||
"POT-Creation-Date: 2019-09-26 23:58+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -149,7 +149,7 @@ msgstr ""
|
||||
msgid "Allocated quantity ({n}) must not exceed available quantity ({q})"
|
||||
msgstr ""
|
||||
|
||||
#: build/views.py:289 stock/views.py:831
|
||||
#: build/views.py:289 stock/views.py:834
|
||||
#, python-brace-format
|
||||
msgid "The following serial numbers already exist: ({sn})"
|
||||
msgstr ""
|
||||
@ -459,51 +459,80 @@ msgstr ""
|
||||
msgid "Serialized {n} items"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:396
|
||||
#: stock/templates/stock/location.html:37
|
||||
msgid "Location Details"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:40
|
||||
msgid "Location Path"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:44
|
||||
msgid "Location Description"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:48
|
||||
msgid "Sublocations"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:52
|
||||
#: stock/templates/stock/location.html:64
|
||||
msgid "Stock Items"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:57
|
||||
msgid "Stock Details"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:60
|
||||
msgid "Stock Locations"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:399
|
||||
msgid "Must enter integer value"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:401
|
||||
#: stock/views.py:404
|
||||
msgid "Quantity must be positive"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:408
|
||||
#: stock/views.py:411
|
||||
#, python-brace-format
|
||||
msgid "Quantity must not exceed {x}"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:416
|
||||
#: stock/views.py:419
|
||||
msgid "Confirm stock adjustment"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:484
|
||||
#: stock/views.py:487
|
||||
#, python-brace-format
|
||||
msgid "Added stock to {n} items"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:499
|
||||
#: stock/views.py:502
|
||||
#, python-brace-format
|
||||
msgid "Removed stock from {n} items"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:512
|
||||
#: stock/views.py:515
|
||||
#, python-brace-format
|
||||
msgid "Counted stock for {n} items"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:540
|
||||
#: stock/views.py:543
|
||||
msgid "No items were moved"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:543
|
||||
#: stock/views.py:546
|
||||
#, python-brace-format
|
||||
msgid "Moved {n} items to {dest}"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:810
|
||||
#: stock/views.py:813
|
||||
msgid "Invalid part selection"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:872
|
||||
#: stock/views.py:875
|
||||
msgid "Created new stock item"
|
||||
msgstr ""
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-09-26 00:37+0000\n"
|
||||
"POT-Creation-Date: 2019-09-26 23:58+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -149,7 +149,7 @@ msgstr ""
|
||||
msgid "Allocated quantity ({n}) must not exceed available quantity ({q})"
|
||||
msgstr ""
|
||||
|
||||
#: build/views.py:289 stock/views.py:831
|
||||
#: build/views.py:289 stock/views.py:834
|
||||
#, python-brace-format
|
||||
msgid "The following serial numbers already exist: ({sn})"
|
||||
msgstr ""
|
||||
@ -459,51 +459,80 @@ msgstr ""
|
||||
msgid "Serialized {n} items"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:396
|
||||
#: stock/templates/stock/location.html:37
|
||||
msgid "Location Details"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:40
|
||||
msgid "Location Path"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:44
|
||||
msgid "Location Description"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:48
|
||||
msgid "Sublocations"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:52
|
||||
#: stock/templates/stock/location.html:64
|
||||
msgid "Stock Items"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:57
|
||||
msgid "Stock Details"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:60
|
||||
msgid "Stock Locations"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:399
|
||||
msgid "Must enter integer value"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:401
|
||||
#: stock/views.py:404
|
||||
msgid "Quantity must be positive"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:408
|
||||
#: stock/views.py:411
|
||||
#, python-brace-format
|
||||
msgid "Quantity must not exceed {x}"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:416
|
||||
#: stock/views.py:419
|
||||
msgid "Confirm stock adjustment"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:484
|
||||
#: stock/views.py:487
|
||||
#, python-brace-format
|
||||
msgid "Added stock to {n} items"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:499
|
||||
#: stock/views.py:502
|
||||
#, python-brace-format
|
||||
msgid "Removed stock from {n} items"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:512
|
||||
#: stock/views.py:515
|
||||
#, python-brace-format
|
||||
msgid "Counted stock for {n} items"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:540
|
||||
#: stock/views.py:543
|
||||
msgid "No items were moved"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:543
|
||||
#: stock/views.py:546
|
||||
#, python-brace-format
|
||||
msgid "Moved {n} items to {dest}"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:810
|
||||
#: stock/views.py:813
|
||||
msgid "Invalid part selection"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:872
|
||||
#: stock/views.py:875
|
||||
msgid "Created new stock item"
|
||||
msgstr ""
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-09-26 00:37+0000\n"
|
||||
"POT-Creation-Date: 2019-09-26 23:58+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -149,7 +149,7 @@ msgstr ""
|
||||
msgid "Allocated quantity ({n}) must not exceed available quantity ({q})"
|
||||
msgstr ""
|
||||
|
||||
#: build/views.py:289 stock/views.py:831
|
||||
#: build/views.py:289 stock/views.py:834
|
||||
#, python-brace-format
|
||||
msgid "The following serial numbers already exist: ({sn})"
|
||||
msgstr ""
|
||||
@ -459,51 +459,80 @@ msgstr ""
|
||||
msgid "Serialized {n} items"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:396
|
||||
#: stock/templates/stock/location.html:37
|
||||
msgid "Location Details"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:40
|
||||
msgid "Location Path"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:44
|
||||
msgid "Location Description"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:48
|
||||
msgid "Sublocations"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:52
|
||||
#: stock/templates/stock/location.html:64
|
||||
msgid "Stock Items"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:57
|
||||
msgid "Stock Details"
|
||||
msgstr ""
|
||||
|
||||
#: stock/templates/stock/location.html:60
|
||||
msgid "Stock Locations"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:399
|
||||
msgid "Must enter integer value"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:401
|
||||
#: stock/views.py:404
|
||||
msgid "Quantity must be positive"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:408
|
||||
#: stock/views.py:411
|
||||
#, python-brace-format
|
||||
msgid "Quantity must not exceed {x}"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:416
|
||||
#: stock/views.py:419
|
||||
msgid "Confirm stock adjustment"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:484
|
||||
#: stock/views.py:487
|
||||
#, python-brace-format
|
||||
msgid "Added stock to {n} items"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:499
|
||||
#: stock/views.py:502
|
||||
#, python-brace-format
|
||||
msgid "Removed stock from {n} items"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:512
|
||||
#: stock/views.py:515
|
||||
#, python-brace-format
|
||||
msgid "Counted stock for {n} items"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:540
|
||||
#: stock/views.py:543
|
||||
msgid "No items were moved"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:543
|
||||
#: stock/views.py:546
|
||||
#, python-brace-format
|
||||
msgid "Moved {n} items to {dest}"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:810
|
||||
#: stock/views.py:813
|
||||
msgid "Invalid part selection"
|
||||
msgstr ""
|
||||
|
||||
#: stock/views.py:872
|
||||
#: stock/views.py:875
|
||||
msgid "Created new stock item"
|
||||
msgstr ""
|
||||
|
@ -1,5 +1,6 @@
|
||||
{% extends "stock/stock_app_base.html" %}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
|
||||
<div class='row'>
|
||||
@ -33,25 +34,37 @@
|
||||
</div>
|
||||
<div class='col-sm-6'>
|
||||
{% if location %}
|
||||
<h3>Location Details</h3>
|
||||
<h3>{% trans "Location Details" %}</h3>
|
||||
<table class='table table-striped table-condensed'>
|
||||
<tr>
|
||||
<td>Location Path</td>
|
||||
<td>{% trans "Location Path" %}</td>
|
||||
<td>{{ location.pathstring }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Location Description</td>
|
||||
<td>{% trans "Location Description" %}</td>
|
||||
<td>{{ location.description }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sublocations</td>
|
||||
<td>{% trans "Sublocations" %}</td>
|
||||
<td>{{ location.children.count }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Stock Items</td>
|
||||
<td>{% trans "Stock Items" %}</td>
|
||||
<td>{{ location.item_count }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% else %}
|
||||
<h3>{% trans "Stock Details" %}</h3>
|
||||
<table class='table table-striped table-condensed'>
|
||||
<tr>
|
||||
<td>{% trans "Stock Locations" %}</td>
|
||||
<td>{{ loc_count }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{% trans "Stock Items" %}</td>
|
||||
<td>{{ stock_count }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
</h3>
|
||||
|
@ -53,6 +53,9 @@ class StockIndex(ListView):
|
||||
context['locations'] = locations
|
||||
context['items'] = StockItem.objects.all()
|
||||
|
||||
context['loc_count'] = StockLocation.objects.count()
|
||||
context['stock_count'] = StockItem.objects.count()
|
||||
|
||||
return context
|
||||
|
||||
|
||||
|
@ -113,14 +113,8 @@ $(document).ready(function () {
|
||||
{% block js_ready %}
|
||||
{% endblock %}
|
||||
|
||||
/* Run document-ready scripts.
|
||||
* Ref: static/script/inventree/inventree.js
|
||||
*/
|
||||
inventreeDocReady();
|
||||
|
||||
/* Display any cached alert messages
|
||||
* Ref: static/script/inventree/notification.js
|
||||
*/
|
||||
showCachedAlerts();
|
||||
});
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user