2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 03:00:54 +00:00

fix trailing

This commit is contained in:
Matthias Mair
2022-05-20 13:20:55 +02:00
parent bd195105e7
commit 93b6934127
99 changed files with 2341 additions and 2347 deletions

View File

@ -274,7 +274,7 @@
tree_id: 0
lft: 0
rght: 0
- model: stock.stockitem
pk: 1002
fields:
@ -285,7 +285,7 @@
tree_id: 0
lft: 0
rght: 0
- model: stock.stockitem
pk: 1003
fields:
@ -307,7 +307,7 @@
tree_id: 0
lft: 0
rght: 0
- model: stock.stockitem
pk: 1005
fields:
@ -318,7 +318,7 @@
tree_id: 0
lft: 0
rght: 0
- model: stock.stockitem
pk: 1006
fields:
@ -329,7 +329,7 @@
tree_id: 0
lft: 0
rght: 0
- model: stock.stockitem
pk: 1007
fields:
@ -340,7 +340,7 @@
tree_id: 0
lft: 0
rght: 0
- model: stock.stockitem
pk: 1008
fields:
@ -351,4 +351,3 @@
tree_id: 0
lft: 0
rght: 0

View File

@ -26,7 +26,7 @@ def update_history(apps, schema_editor):
# Note we cannot use the 'pathstring' function here as we don't have access to model functions!
path = [location.name]
loc = location
while loc.parent:
@ -48,7 +48,7 @@ def update_history(apps, schema_editor):
deltas = {}
updated = False
q = entry.quantity
if idx == 0 or not q == quantity:
@ -69,7 +69,7 @@ def update_history(apps, schema_editor):
if 'completed build' in title:
tracking_type = StockHistoryCode.BUILD_OUTPUT_COMPLETED
elif 'removed' in title and 'item' in title:
if entry.notes.lower().startswith('split '):
@ -81,7 +81,7 @@ def update_history(apps, schema_editor):
result = re.search(r"^removed ([\d\.]+) items", title)
if result:
removed = result.groups()[0]
try:
@ -93,12 +93,12 @@ def update_history(apps, schema_editor):
print(f"WARNING: Error converting removed quantity '{removed}'")
else:
print(f"Could not decode '{title}'")
elif 'split from existing' in title:
tracking_type = StockHistoryCode.SPLIT_FROM_PARENT
deltas['quantity'] = float(q)
elif 'moved to' in title:
tracking_type = StockHistoryCode.STOCK_MOVE
@ -119,7 +119,7 @@ def update_history(apps, schema_editor):
# Direct match for name
if text == location.name:
matches.add(location)
# Match for "name - description"
compare = f"{location.name} - {location.description}"
@ -140,7 +140,7 @@ def update_history(apps, schema_editor):
else:
print(f"No location match: '{text}'")
break
elif 'created stock item' in title:
tracking_type = StockHistoryCode.CREATED
@ -152,7 +152,7 @@ def update_history(apps, schema_editor):
elif 'counted' in title:
tracking_type = StockHistoryCode.STOCK_COUNT
elif 'added' in title:
tracking_type = StockHistoryCode.STOCK_ADD
@ -160,7 +160,7 @@ def update_history(apps, schema_editor):
result = re.search(r"^added ([\d\.]+) items", title)
if result:
added = result.groups()[0]
try:

View File

@ -26,7 +26,7 @@
</div>
</div>
<div class='panel-content'>
<div id='tracking-table-toolbar'>
<div id='tracking-table-toolbar'>
<div class='btn-group'>
{% include "filter_list.html" with id="stocktracking" %}
</div>
@ -111,8 +111,8 @@
{% include "filter_list.html" with id="stocktests" %}
</div>
</div>
<table class='table table-striped table-condensed' data-toolbar='#test-button-toolbar' id='test-result-table'></table>
<table class='table table-striped table-condensed' data-toolbar='#test-button-toolbar' id='test-result-table'></table>
</div>
</div>
@ -210,7 +210,7 @@
quantity: {{ item.quantity|unlocalize }},
}
);
onPanelLoad('notes', function() {
setupNotesField(
'stock-notes',
@ -322,7 +322,7 @@
reload: true,
}
);
});
});
loadStockTrackingTable($("#track-table"), {
params: {
@ -330,7 +330,7 @@
item: {{ item.pk }},
user_detail: true,
},
url: "{% url 'api-stock-tracking-list' %}",
url: "{% url 'api-stock-tracking-list' %}",
});
enableSidebar('stockitem');

View File

@ -102,7 +102,7 @@
<li><a class='dropdown-item' href='#' id='stock-uninstall' title='{% trans "Uninstall stock item" %}'><span class='fas fa-unlink'></span> {% trans "Uninstall" %}</a></li>
{% else %}
{% if item.part.get_used_in %}
<!--
<!--
<li><a class='dropdown-item' href='#' id='stock-install-in' title='{% trans "Install stock item" %}'><span class='fas fa-link'></span> {% trans "Install" %}</a></li>
-->
{% endif %}
@ -260,13 +260,13 @@
{% trans "This stock item is allocated to Build Order" %} {{ link }} {% if qty < item.quantity %}({% trans "Quantity" %}: {{ qty }}){% endif %}
</div>
{% endfor %}
{% if item.serialized %}
<div class='alert alert-block alert-warning'>
{% trans "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." %}
</div>
{% endif %}
</div>
{% endblock details %}
@ -473,7 +473,7 @@ $("#print-label").click(function() {
{% if roles.stock.change %}
$("#stock-duplicate").click(function() {
// Duplicate a stock item
// Duplicate a stock item
duplicateStockItem({{ item.pk }}, {});
});
@ -512,7 +512,7 @@ $("#barcode-unlink").click(function() {
});
$("#barcode-scan-into-location").click(function() {
inventreeGet('{% url "api-stock-detail" item.pk %}', {}, {
success: function(item) {
scanItemsIntoLocation([item]);

View File

@ -205,7 +205,7 @@
{% include "filter_list.html" with id="location" %}
</div>
</div>
<table class='table table-striped table-condensed' data-toolbar='#sublocation-button-toolbar' id='sublocation-table'></table>
</div>
</div>
@ -235,33 +235,33 @@
allowTreeView: true,
});
});
linkButtonsToSelection(
$('#sublocation-table'),
[
'#location-print-options',
]
);
{% if labels_enabled %}
$('#print-label').click(function() {
var locs = [{{ location.pk }}];
printStockLocationLabels(locs);
printStockLocationLabels(locs);
});
$('#multi-location-print-label').click(function() {
var selections = $('#sublocation-table').bootstrapTable('getSelections');
var locations = [];
selections.forEach(function(loc) {
locations.push(loc.pk);
});
printStockLocationLabels(locations);
});
{% endif %}

View File

@ -7,7 +7,7 @@
<div class='alert alert-block alert-danger'>
{% trans "Are you sure you want to delete this stock location?" %}
</div>
{% if location.children.all|length > 0 %}
<div class='alert alert-block alert-warning'>
{% blocktrans with n=location.children.all|length %}This location contains {{ n }} child locations{% endblocktrans %}.<br>
@ -31,4 +31,4 @@
</div>
{% endif %}
{% endblock %}
{% endblock %}