mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-18 22:17:51 +00:00
* feat(stock): add exclude_from_stock option to StockLocation (#7064) * feat(stock): add UI detail, table filters, API version bump, and prek formatting (#7064) --------- Co-authored-by: UGREEN USER <jaharoni@debian.dedomain> Co-authored-by: WholeTroutMedia <cortex@inceptionengine.systems> Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
12 files changed
+105
-3
No files matched your search
@@ -2195,6 +2195,7 @@ export function useStockLocationFields(): ApiFormFieldSet {
|
||||
},
|
||||
structural: {},
|
||||
external: {},
|
||||
exclude_from_stock: {},
|
||||
custom_icon: {
|
||||
field_type: 'icon'
|
||||
},
|
||||
|
||||
@@ -78,6 +78,11 @@ export function StockLocationDetailsPanel({
|
||||
name: 'external',
|
||||
label: t`External`
|
||||
},
|
||||
{
|
||||
type: 'boolean',
|
||||
name: 'exclude_from_stock',
|
||||
label: t`Exclude from Stock`
|
||||
},
|
||||
{
|
||||
type: 'string',
|
||||
name: 'location_type_detail.name',
|
||||
|
||||
@@ -320,6 +320,11 @@ function stockItemTableFilters({
|
||||
label: t`External Location`,
|
||||
description: t`Show items in an external location`
|
||||
},
|
||||
{
|
||||
name: 'exclude_from_stock',
|
||||
label: t`Exclude from Stock`,
|
||||
description: t`Show items in a location excluded from stock calculations`
|
||||
},
|
||||
TagsFilter({ modelType: ModelType.stockitem })
|
||||
];
|
||||
}
|
||||
|
||||
@@ -51,6 +51,11 @@ export function StockLocationTable({ parentId }: Readonly<{ parentId?: any }>) {
|
||||
label: t`External`,
|
||||
description: t`Show external locations`
|
||||
},
|
||||
{
|
||||
name: 'exclude_from_stock',
|
||||
label: t`Exclude from Stock`,
|
||||
description: t`Show locations excluded from stock calculations`
|
||||
},
|
||||
{
|
||||
name: 'has_location_type',
|
||||
label: t`Has location type`
|
||||
@@ -97,6 +102,10 @@ export function StockLocationTable({ parentId }: Readonly<{ parentId?: any }>) {
|
||||
accessor: 'external',
|
||||
defaultVisible: false
|
||||
}),
|
||||
BooleanColumn({
|
||||
accessor: 'exclude_from_stock',
|
||||
defaultVisible: false
|
||||
}),
|
||||
{
|
||||
accessor: 'location_type',
|
||||
sortable: false,
|
||||
|
||||
Reference in new issue
Block a user