mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 13:05:42 +00:00
Add action buttons to each build output
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
{% load i18n %}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel panel-default" id='allocation-panel-{{ item.pk }}'>
|
||||
<div class="panel-heading" role="tab" id="heading-{{ item.pk }}">
|
||||
<div class="panel-title">
|
||||
<div class='row'>
|
||||
@ -10,11 +10,15 @@
|
||||
</div>
|
||||
</a>
|
||||
<div class='col-sm-3'>
|
||||
PROGRESS
|
||||
<div>
|
||||
{% trans "Completed lines" %}:
|
||||
<div id='output-progress-{{ item.pk }}'>
|
||||
<span class='fas fa-spin fa-spinner'></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-sm-3'>
|
||||
ACTIONS
|
||||
<div class='btn-group float-right' id='#output-actions-{{ item.pk }}'>
|
||||
<div class='btn-group float-right' id='output-actions-{{ item.pk }}'>
|
||||
<span class='fas fa-spin fa-spinner'></span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -3,7 +3,12 @@
|
||||
{% load inventree_extras %}
|
||||
|
||||
{% block pre_form_content %}
|
||||
{% trans "Are you sure you want to unallocate these parts?" %}
|
||||
<br>
|
||||
This will remove {% decimal item.quantity %} parts from build '{{ item.build.title }}'.
|
||||
<div class='alert alert-block alert-danger'>
|
||||
<p>
|
||||
{% trans "Are you sure you want to unallocate this stock?" %}
|
||||
</p>
|
||||
<p>
|
||||
{% trans "The selected stock will be unallocated from the build output" %}
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
@ -680,15 +680,12 @@ class BuildItemCreate(AjaxCreateView):
|
||||
quantity = min(quantity, item.unallocated_quantity())
|
||||
|
||||
# If the output has been specified
|
||||
print("output_id:", output_id)
|
||||
if output_id:
|
||||
try:
|
||||
output = StockItem.objects.get(pk=output_id)
|
||||
initials['install_into'] = output
|
||||
print("Output:", output)
|
||||
except (ValueError, StockItem.DoesNotExist):
|
||||
pass
|
||||
print("no output found")
|
||||
|
||||
if quantity is not None:
|
||||
initials['quantity'] = quantity
|
||||
|
Reference in New Issue
Block a user