added feature to relocate stocks to a different storage

...had to deal with form prefixes at some places
...storage search does not work as expected yet :(
This commit is contained in:
2025-01-27 22:55:05 +01:00
parent 3ec11cf092
commit aefcc472ea
6 changed files with 47 additions and 7 deletions

View File

@@ -55,6 +55,12 @@ needs following context:
<input type="submit" class="btn btn-primary" name="submit-edit-lot" value="Update Lot">
</div>
</form>
<form method="post">
{% csrf_token %}
<input type="hidden" name="prefix" value="{{relocate_form.prefix}}">
{{ relocate_form|crispy }}
<input type="submit" class="btn btn-warning" name="submit-relocate-stock" value="Relocate Stock">
</form>
</div>
</div>
</div>

View File

@@ -126,8 +126,8 @@
{% include 'paginator.html' with paginator=stocks get_param='stock_page' aria_label='Stock Page Navigation' %}
</div>
</div>
{% for stock in stocks %}
{% include 'parts/modals/update-stock-modal.html' with stock=stock form=change_stock_form %}
{% for stock in stocks_with_forms %}
{% include 'parts/modals/update-stock-modal.html' with stock=stock.object form=change_stock_form relocate_form=stock.relocate_form %}
{% endfor %}
<!-- Modal for adding a substorage-->
{% with add_storage_form as form %}