mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 20:45:44 +00:00
[Feature] Scrap Build Outputs (#4800)
* Update docs for status codes * Adds API endpoint for scrapping individual build outputs * Support 'buildorder' reference in stock tracking history * Add page for build output documentation * Build docs * Add example build order process to docs * remove debug statement * JS lint cleanup * Add migration file for stock status * Add unit tests for build output scrapping * Increment API version * bug fix
This commit is contained in:
12
docs/docs/build/allocate.md
vendored
12
docs/docs/build/allocate.md
vendored
@ -131,16 +131,6 @@ Here we can see that the incomplete build outputs (serial numbers 15 and 14) now
|
||||
- Serial number 15 has been fully allocated, and can be completed
|
||||
- Serial number 14 has not been fully allocated, and cannot yet be completed
|
||||
|
||||
## Completing a Build Output
|
||||
|
||||
An individual build output is completed by selecting the "Complete build output" button associated with that build output:
|
||||
|
||||
{% with id="build_output_complete", url="build/build_output_complete.png", description="Complete build output" %}
|
||||
{% include "img.html" %}
|
||||
{% endwith %}
|
||||
|
||||
Here the user can select the destination location for the build output, as well as the stock item status.
|
||||
|
||||
### Allocated Stock
|
||||
|
||||
*Tracked* stock items which are allocated against the selected build output will be removed from stock, and installed "inside" the output assembly. The allocated stock items will still exist in the InvenTree database, however will no longer be available for regular stock actions.
|
||||
@ -151,7 +141,7 @@ Here the user can select the destination location for the build output, as well
|
||||
## Completing a Build
|
||||
|
||||
!!! warning "Complete Build Outputs"
|
||||
A build order cannot be completed if there are outstanding build outputs. Ensure that all build outputs are completed first.
|
||||
A build order cannot be completed if there are outstanding build outputs. Ensure that all [build outputs](./output.md) are completed first.
|
||||
|
||||
Once all build outputs have been completed, the build order itself can be completed by selecting the *Complete Build* button:
|
||||
|
||||
|
5
docs/docs/build/build.md
vendored
5
docs/docs/build/build.md
vendored
@ -66,8 +66,7 @@ The following parameters are available for each Build Order, and can be edited b
|
||||
|
||||
A *Build Output* creates a new stock instance of the assembly part, of a specified quantity. Each *Build Order* requires at least one build output. Multiple build outputs can be specified if the build is completed in batches.
|
||||
|
||||
!!! info "Example - Build Outputs"
|
||||
For example, let's say we wish to create 10 new "Widgets". We create a new build for the widget, which signals an *intent* to assemble the "Widget" in quantity 10. We can produce 5 widgets in a single day, and so we create 2 build outputs, each of quantity 5.
|
||||
Read more about build outputs [here](./output.md).
|
||||
|
||||
### Build Status
|
||||
|
||||
@ -125,7 +124,7 @@ The allocation table (as shown above) shows the stock allocation progress for th
|
||||
|
||||
### Build Outputs
|
||||
|
||||
The *Build Outputs* tab shows the outputs (created stock items) associated with this build.
|
||||
The *Build Outputs* tab shows the [build outputs](./output.md) (created stock items) associated with this build.
|
||||
|
||||
As shown below, there are separate panels for *incomplete* and *completed* build outputs.
|
||||
|
||||
|
57
docs/docs/build/example.md
vendored
Normal file
57
docs/docs/build/example.md
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
---
|
||||
title: Build Order Example
|
||||
---
|
||||
|
||||
## Build Order Example
|
||||
|
||||
For example, let's say we wish to create 10 new "Widgets". We create a new build for the widget, which signals an *intent* to assemble the "Widget" in quantity 10. As the *Widget* is a serialized part, with tracked subcomponents, the build outputs must themselves be serialized. This means that we need to generate 10 separate build outputs for this build order.
|
||||
|
||||
### Create Build Order
|
||||
|
||||
First, create a new build order for the *Widget* assembly:
|
||||
|
||||
{% with id="build_example_create", url="build/build_example_create.png", description="Create build order" %}
|
||||
{% include "img.html" %}
|
||||
{% endwith %}
|
||||
|
||||
### Generate Build Outputs
|
||||
|
||||
Generate build outputs for this build order. As this is a tracked item, with tracked subcomponents, the build outputs must be serialized:
|
||||
|
||||
{% with id="build_example_create_outputs", url="build/build_example_create_outputs.png", description="Create build outputs" %}
|
||||
{% include "img.html" %}
|
||||
{% endwith %}
|
||||
|
||||
A list of new build outputs will have now been generated:
|
||||
|
||||
{% with id="build_example_incomplete_list", url="build/build_example_incomplete_list.png", description="Incomplete build outputs" %}
|
||||
{% include "img.html" %}
|
||||
{% endwith %}
|
||||
|
||||
### Allocate Untracked Stock
|
||||
|
||||
Untracked stock items are allocated to the build order in the *Allocate Stock* tab:
|
||||
|
||||
{% with id="build_example_allocate_untracked", url="build/build_example_allocate_untracked.png", description="Allocated Untracked Stock" %}
|
||||
{% include "img.html" %}
|
||||
{% endwith %}
|
||||
|
||||
### Allocate Tracked Stock
|
||||
|
||||
Tracked stock items are allocated to individual build outputs:
|
||||
|
||||
{% with id="build_example_allocate_tracked", url="build/build_example_allocated_tracked.png", description="Allocated Tracked Stock" %}
|
||||
{% include "img.html" %}
|
||||
{% endwith %}
|
||||
|
||||
### Complete Build Outputs
|
||||
|
||||
Mark each build output as complete:
|
||||
|
||||
{% with id="build_example_complete_outputs", url="build/build_example_complete_outputs.png", description="Complete Build Outputs" %}
|
||||
{% include "img.html" %}
|
||||
{% endwith %}
|
||||
|
||||
### Complete Build Order
|
||||
|
||||
Once the build outputs have been completed, and all stock has been allocated, the build order can be completed.
|
119
docs/docs/build/output.md
vendored
Normal file
119
docs/docs/build/output.md
vendored
Normal file
@ -0,0 +1,119 @@
|
||||
---
|
||||
title: Build Outputs
|
||||
---
|
||||
|
||||
## Build Outputs
|
||||
|
||||
With reference to a [build order](./build.md), a *Build Output* is a finished product which is expected to be produced by completing the order.
|
||||
|
||||
- A single build order may have multiple build outputs which are produced at different times or by different operators.
|
||||
- An individual build output may be a single unit, or a batch of units
|
||||
- Serial numbers and batch codes can be associated with a build output
|
||||
|
||||
### Incomplete Outputs
|
||||
|
||||
The *Incomplete Outputs* tab displays any outstanding / in-progress build outputs for the current build order.
|
||||
|
||||
{% with id="build-outputs-incomplete", url="build/build_outputs_incomplete.png", description="Incomplete build outputs" %}
|
||||
{% include "img.html" %}
|
||||
{% endwith %}
|
||||
|
||||
### Completed Outputs
|
||||
|
||||
The *Completed Outputs* tab displays any [completed](#complete-build-output) or [scrapped](#scrap-build-output) outputs for the current build order.
|
||||
|
||||
{% with id="build-outputs-complete", url="build/build_outputs_complete.png", description="Complete build outputs" %}
|
||||
{% include "img.html" %}
|
||||
{% endwith %}
|
||||
|
||||
## Create Build Output
|
||||
|
||||
Create a new build output by pressing the <span class="badge inventree add"><span class='fas fa-plus-circle'></span> New Build Output</span> button under the [incomplete outputs](#incomplete-outputs) tab:
|
||||
|
||||
{% with id="build_output_create", url="build/build_output_create.png", description="Create build output" %}
|
||||
{% include "img.html" %}
|
||||
{% endwith %}
|
||||
|
||||
### Create Options
|
||||
|
||||
The following options are available when creating a new build output:
|
||||
|
||||
| Option | Description |
|
||||
| --- | --- |
|
||||
| Quantity | The number of items to create as part of this build output |
|
||||
| Serial Numbers | If this is a tracked build output, the serial numbers for each of the generated outputs |
|
||||
| Batch Code | Batch code identifier for the generated output(s) |
|
||||
| Auto Allocate Serial Numbers | If selected, any available tracked subcomponents which already have serial numbers assigned, will be automatically assigned to matching build outputs |
|
||||
|
||||
### Specifying Serial Numbers
|
||||
|
||||
Refer to the [serial number generation guide](../stock/tracking.md#generating-serial-numbers) for further information on serial number input.
|
||||
|
||||
## Complete Build Output
|
||||
|
||||
*Completing* a build output marks that output as finished, in the context of the given build order.
|
||||
|
||||
An individual build output is completed by selecting the "Complete build output" button associated with that build output:
|
||||
|
||||
{% with id="build_output_complete", url="build/build_output_complete.png", description="Complete build output" %}
|
||||
{% include "img.html" %}
|
||||
{% endwith %}
|
||||
|
||||
Here the user can select the destination location for the build output, as well as the stock item status.
|
||||
|
||||
Marking the build output(s) as complete performs the following actions:
|
||||
|
||||
- The completed build quantity is increased by the quantity of the selected build output(s)
|
||||
- The build output(s) are marked as "completed", and available for stock actions
|
||||
- Any [tracked BOM items](./allocate.md#allocating-tracked-stock) which are allocated to the build output are *installed* into that build output.
|
||||
|
||||
### Complete Options
|
||||
|
||||
The following options are available when completing a build output:
|
||||
|
||||
| Option | Description |
|
||||
| --- | --- |
|
||||
| Status | The [stock status](../stock/status.md) for the completed outputs |
|
||||
| Location | The [stock location](../stock/stock.md#stock-location) where the outputs will be located |
|
||||
| Notes | Any additional notes associated with the completion of these outputs |
|
||||
| Accept Incomplete Allocation | If selected, this option allows [tracked build outputs](./allocate.md#tracked-build-outputs) to be completed in the case where required BOM items have not been fully allocated |
|
||||
|
||||
## Scrap Build Output
|
||||
|
||||
*Scrapping* a build output marks the particular output as rejected, in the context of the given build order.
|
||||
|
||||
An individual build output is completed by selecting the *Scrap build output* button associated with that build output:
|
||||
|
||||
{% with id="build_output_scrap", url="build/build_output_scrap.png", description="Scrap build output" %}
|
||||
{% include "img.html" %}
|
||||
{% endwith %}
|
||||
|
||||
Marking the build output(s) as scrapped performs the following actions:
|
||||
|
||||
- The build outputs are marked as "rejected" and removed from the build
|
||||
- The completed build quantity *does not increase*
|
||||
- The build outputs are not available for any further stock actions
|
||||
- Optionally, any [tracked BOM items](./allocate.md#allocating-tracked-stock) which are allocated to the build output are *installed* into the rejected build output
|
||||
|
||||
### Scrap Options
|
||||
|
||||
The following options are available when scrapping a build order:
|
||||
|
||||
| Option | Description |
|
||||
| --- | --- |
|
||||
| Location | The stock location where the scrapped build output(s) will be located |
|
||||
| Notes | Any additional notes associated with the scrapping of these outputs |
|
||||
| Discard Allocations | If selected, any installed BOM items will be removed first, before marking the build output as scrapped. Use this option if the installed items are recoverable and can be used elsewhere |
|
||||
|
||||
## Delete Build Output
|
||||
|
||||
*Deleting* a build output causes the build output to be cancelled, and removed from the database entirely. Use this option when the build output does not physically exist (or was never built) and should not be tracked in the database.
|
||||
|
||||
{% with id="build_output_delete", url="build/build_output_delete.png", description="Delete build output" %}
|
||||
{% include "img.html" %}
|
||||
{% endwith %}
|
||||
|
||||
Marking the build output(s) as deleted performs the following actions:
|
||||
|
||||
- Any allocated stock items are returned to stock
|
||||
- The build output is removed from the database
|
Reference in New Issue
Block a user