Adds separate option for "prevent_new_stock" to stock_table

This commit is contained in:
Oliver 2021-09-08 12:57:42 +10:00
parent 8368798280
commit 1a21576f28
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@
<h4>{% trans "Received Items" %}</h4>
</div>
<div class='panel-content'>
{% include "stock_table.html" with read_only=True %}
{% include "stock_table.html" with prevent_new_stock=True %}
</div>
</div>

View File

@ -16,7 +16,7 @@
</button>
{% if owner_control.value == "True" and user in owners or user.is_superuser or owner_control.value == "False" %}
{% if not read_only and roles.stock.add %}
{% if not read_only and not prevent_new_stock and roles.stock.add %}
<button class="btn btn-success" id='item-create' title='{% trans "New Stock Item" %}'>
<span class='fas fa-plus-circle'></span>
</button>