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

Added global setting and updated stock item templates

This commit is contained in:
eeintech
2020-12-01 15:54:05 -05:00
parent e1fb7e5d98
commit 2c38be2d13
5 changed files with 26 additions and 4 deletions

View File

@ -11,7 +11,9 @@
<h4>{% trans "Stock Tracking Information" %}</h4>
<hr>
{% if roles.stock.change %}
<!-- Check permissions and owner -->
{% setting_object 'STOCK_OWNER' as owner_enable %}
{% if user.is_superuser or roles.stock.change and item.owner == user and owner_enable.value == "True" %}
<div id='table-toolbar'>
<div class='btn-group'>
<button class='btn btn-success' type='button' title='New tracking entry' id='new-entry'>

View File

@ -112,7 +112,10 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
</ul>
</div>
<!-- Stock adjustment menu -->
{% if roles.stock.change and not item.is_building %}
<!-- Check permissions and owner -->
{% setting_object 'STOCK_OWNER' as owner_enable %}
{% if user.is_superuser or roles.stock.change and item.owner == user and owner_enable.value == "True" %}
{% if not item.is_building %}
<div class='btn-group'>
<button id='stock-options' title='{% trans "Stock adjustment actions" %}' class='btn btn-default dropdown-toggle' type='button' data-toggle='dropdown'><span class='fas fa-boxes'></span> <span class='caret'></span></button>
<ul class='dropdown-menu' role='menu'>
@ -161,6 +164,8 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
</ul>
</div>
{% endif %}
<!-- Check permissions and owner -->
{% endif %}
<button type='button' class='btn btn-default' id='stock-test-report' title='{% trans "Generate test report" %}'>
<span class='fas fa-file-invoice'/>
</button>