+
+ {% setting_object 'STOCK_OWNERSHIP_CONTROL' as owner_control %}
+ {% if owner_control.value == "True" %}
+ {% authorized_owners location.owner as owners %}
+
+ {% if location and not user in owners and not user.is_superuser %}
+
+ {% trans "You are not in the list of owners of this location. This stock location cannot be edited." %}
-
- {% if owner_control.value == "False" or owner_control.value == "True" and user in owners or user.is_superuser %}
- {% if roles.stock.change %}
-
-
-
-
+ {% endif %}
+ {% endif %}
+
+
+
+
+ {% if owner_control.value == "False" or owner_control.value == "True" and user in owners or user.is_superuser or not location %}
+ {% if roles.stock_location.add %}
+
+ {% endif %}
{% endif %}
- {% if roles.stock_location.change %}
-
-
-
+
+
+ {% if location %}
+
+
+
+ |
+ {% trans "Description" %} |
+ {{ location.description }} |
+
+
+ |
+ {% trans "Sublocations" %} |
+ {{ location.children.count }} |
+
+
+ |
+ {% trans "Stock Items" %} |
+ {{ location.item_count }} |
+
+
+ {% else %}
+
{% trans "Stock Details" %}
+
+
+
+ |
+ {% trans "Stock Locations" %} |
+ {{ loc_count }} |
+
+
+ |
+ {% trans "Stock Items" %} |
+ {{ stock_count }} |
+
+
{% endif %}
-
-
- {% if location %}
-
{% trans "Location Details" %}
-
-
-
- |
- {% trans "Location Path" %} |
- {{ location.pathstring }} |
-
-
- |
- {% trans "Location Description" %} |
- {{ location.description }} |
-
-
- |
- {% trans "Sublocations" %} |
- {{ location.children.count }} |
-
-
- |
- {% trans "Stock Items" %} |
- {{ location.item_count }} |
-
-
- {% else %}
-
{% trans "Stock Details" %}
-
-
-
- |
- {% trans "Stock Locations" %} |
- {{ loc_count }} |
-
-
- |
- {% trans "Stock Items" %} |
- {{ stock_count }} |
-
-
- {% endif %}
-
-
+