mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 12:36:45 +00:00
* Add custom user defined states * make tests more reliable * fix list options * Adapt version * do not engage if rebuilding * remove unneeded attr * remove unneeded attr * fix enum imports * adapt cove target * Add status_custom_key to all other serializers * fix serializer method * simplify branching * remove unneeded imports * inherit read_only status from leader field * Add more tests * fix tests * add test for function * refactor for easier testing * move test to seperate class * Add options testing * extend serializer * add test for all states and refactor to reuse already build functions * use custom field in PUI too * reset diff * style fix * fix comparison * Add test for str * test color exceptions too * remove user state from tracking * Add intro from model fields too * update docs * simplify implementation * update tests * fix name * rename test * simplify tags and test fully * extend test to machine status * move logic for response formatting over * extend api response with machine status * ensure only direct subclasses are discovered * test for length of total respone too * use new fields on PUI too * fix test assertion with plugins enabled * also observe rendering in filters * Add managment endpoints and APIs * Add contenttypes to PUI renderes * use filteres instead * fix import order * fix api route definition * move status choices to serializer * fix lookup * fix filtering * remove admin integration * cleanup migration * fix migration change * cleanup code location * fix imports * Add docs for custom states * add links to custom status
54 lines
2.4 KiB
Markdown
54 lines
2.4 KiB
Markdown
---
|
|
title: Stock Status
|
|
---
|
|
|
|
## Stock Status
|
|
|
|
Each [Stock Item](./stock.md#stock-item) has a *status* attribute, which serves to identify the current condition of the individual stock item.
|
|
|
|
Certain stock item status codes will restrict the availability of the stock item.
|
|
|
|
Below is the list of available stock status codes and their meaning:
|
|
|
|
| Status | Description | Available |
|
|
| ----------- | ----------- | --- |
|
|
| <span class='badge inventree success'>OK</span> | Stock item is healthy, nothing wrong to report | <span class='badge inventree success'>Yes</span> |
|
|
| <span class='badge inventree warning'>Attention needed</span> | Stock item hasn't been checked or tested yet | <span class='badge inventree success'>Yes</span> |
|
|
| <span class='badge inventree warning'>Damaged</span> | Stock item is not functional in its present state | <span class='badge inventree success'>Yes</span> |
|
|
| <span class='badge inventree danger'>Destroyed</span> | Stock item has been destroyed | <span class='badge inventree danger'>No</span> |
|
|
| <span class='badge inventree'>Lost</span> | Stock item has been lost | <span class='badge inventree danger'>No</span> |
|
|
| <span class='badge inventree danger'>Rejected</span> | Stock item did not pass the quality control standards | <span class='badge inventree danger'>No</span> |
|
|
| <span class='badge inventree info'>Quarantined</span> | Stock item has been intentionally isolated and it unavailable | <span class='badge inventree danger'>No</span> |
|
|
|
|
The *status* of a given stock item is displayed on the stock item detail page:
|
|
|
|
{% with id="stock_status_label", url="stock/stock_status_label.png", description="Stock Status Label" %}
|
|
{% include 'img.html' %}
|
|
{% endwith %}
|
|
|
|
**Source Code**
|
|
|
|
Refer to the source code for the Stock status codes:
|
|
|
|
::: stock.status_codes.StockStatus
|
|
options:
|
|
show_bases: False
|
|
show_root_heading: False
|
|
show_root_toc_entry: False
|
|
show_source: True
|
|
members: []
|
|
|
|
Stock Status supports [custom states](../concepts/custom_states.md).
|
|
|
|
### Default Status Code
|
|
|
|
The default status code for any newly created Stock Item is <span class='badge inventree success'>OK</span>
|
|
|
|
## Update Status
|
|
|
|
To update the status code for an individual stock item, open the *Edit Stock Item* dialog and then select the required status code in the *Status* field
|
|
|
|
{% with id="stock_status_edit", url="stock/stock_status_edit.png", description="Edit stock item status" %}
|
|
{% include 'img.html' %}
|
|
{% endwith %}
|