2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-12-17 01:38:19 +00:00

Default Supplier Support Missing in 1.X.X (#10980)

Fixes #10979
This commit is contained in:
Matthias Mair
2025-12-16 12:12:35 +01:00
committed by GitHub
parent 19239c8621
commit 2eccf13c93
2 changed files with 15 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
import { ApiEndpoints, ModelType, apiUrl } from '@lib/index';
import type { ApiFormFieldSet } from '@lib/types/Forms';
import { t } from '@lingui/core/macro';
import { IconBuildingStore, IconCopy, IconPackages } from '@tabler/icons-react';
@@ -53,6 +54,13 @@ export function usePartFields({
structural: false
}
},
default_supplier: {
model: ModelType.company,
api_url: apiUrl(ApiEndpoints.company_list),
filters: {
is_supplier: true
}
},
default_expiry: {},
minimum_stock: {},
responsible: {

View File

@@ -501,6 +501,13 @@ export default function PartDetail() {
model: ModelType.stocklocation,
hidden: part.default_location || !part.category_default_location
},
{
type: 'link',
name: 'default_supplier',
label: t`Default Supplier`,
model: ModelType.company,
hidden: !part.default_supplier
},
{
type: 'string',
name: 'units',