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

Display "Fulfilled" items

- Once a salesorder has been marked as "shipped" then the table is displayed differently
- The sub rows show stock items which have been fulfilled against the sales order
This commit is contained in:
Oliver Walters
2020-04-27 10:31:38 +10:00
parent 9b882f4d17
commit 5e309a62f7
6 changed files with 153 additions and 89 deletions

View File

@ -541,6 +541,10 @@ class StockItem(MPTTModel):
if self.build_order is not None:
return False
# Not 'in stock' if the status code makes it unavailable
if self.status in StockStatus.UNAVAILABLE_CODES:
return False
return True
@property

View File

@ -50,17 +50,7 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
{% block page_data %}
<h3>
{% trans "Stock Item" %}
{% if item.sales_order %}
<a href="{% url 'so-detail' item.sales_order.id %}">
<div class='label label-large label-large-blue'>{% trans "Sold" $}</div>
</a>
{% elif item.build_order %}
<a href="{% url 'build-detail' item.build_order.id %}">
<div class='label label-large label-large-blue'>{% trans "Used in Build" %}</div>
</a>
{% else %}
{% stock_status_label item.status large=True %}
{% endif %}
</h3>
<hr>
<h4>