mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Only users with Part view permission have part URL shown
This commit is contained in:
parent
e4ce19d22a
commit
5bcf8529ff
@ -60,10 +60,17 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
|
||||
</h3>
|
||||
<hr>
|
||||
<h4>
|
||||
{% if roles.part.view %}
|
||||
<a href='{% url "part-detail" item.part.pk %}'>
|
||||
{% endif %}
|
||||
{{ item.part.full_name}}
|
||||
{% if roles.part.view %}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if item.serialized %}
|
||||
<a href='{% url "part-detail" item.part.pk %}'>{{ item.part.full_name}}</a> # {{ item.serial }}
|
||||
# {{ item.serial }}
|
||||
{% else %}
|
||||
<a href='{% url "part-detail" item.part.pk %}'>{{ item.part.full_name }}</a> × {% decimal item.quantity %}
|
||||
× {% decimal item.quantity %}
|
||||
{% endif %}
|
||||
{% if user.is_staff and roles.stock.change %}
|
||||
<a href="{% url 'admin:stock_stockitem_change' item.pk %}"><span title="{% trans 'Admin view' %}" class='fas fa-user-shield'></span></a>
|
||||
@ -156,7 +163,13 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
|
||||
<td><span class='fas fa-shapes'></span></td>
|
||||
<td>{% trans "Base Part" %}</td>
|
||||
<td>
|
||||
<a href="{% url 'part-stock' item.part.id %}">{{ item.part.full_name }}
|
||||
{% if roles.part.view %}
|
||||
<a href="{% url 'part-stock' item.part.id %}">
|
||||
{% endif %}
|
||||
{{ item.part.full_name }}
|
||||
{% if roles.part.view %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% if item.serialized %}
|
||||
|
Loading…
Reference in New Issue
Block a user