mirror of
https://github.com/inventree/InvenTree.git
synced 2025-10-24 09:57:40 +00:00
Allow adjument of build outputs (#10600)
* Auto-select location * Allow stock adjustments for "in production" items * Tweak stock move check * Allow splitting of production stock * Update CHANGELOG.md
This commit is contained in:
@@ -712,6 +712,9 @@ function stockTransferFields(items: any[]): ApiFormFieldSet {
|
||||
|
||||
const records = Object.fromEntries(items.map((item) => [item.pk, item]));
|
||||
|
||||
// Extract all location values from the items
|
||||
const locations = [...new Set(items.map((item) => item.location))];
|
||||
|
||||
const fields: ApiFormFieldSet = {
|
||||
items: {
|
||||
field_type: 'table',
|
||||
@@ -740,6 +743,7 @@ function stockTransferFields(items: any[]): ApiFormFieldSet {
|
||||
]
|
||||
},
|
||||
location: {
|
||||
value: locations.length === 1 ? locations[0] : undefined,
|
||||
filters: {
|
||||
structural: false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user