mirror of
https://github.com/inventree/InvenTree.git
synced 2026-05-09 03:03:41 +00:00
Supplier part form (#11884)
* Fix SupplierPart sub-form Co-authored-by: Copilot <copilot@github.com> * Fix details panel for SupplierPart page --------- Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -144,10 +144,25 @@ export function usePurchaseOrderLineItemFields({
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
addCreateFields: {
|
addCreateFields: {
|
||||||
part: {},
|
part: {
|
||||||
|
filters: {
|
||||||
|
active: true,
|
||||||
|
purchaseable: true
|
||||||
|
}
|
||||||
|
},
|
||||||
SKU: {},
|
SKU: {},
|
||||||
|
manufacturer_part: {
|
||||||
|
filters: {
|
||||||
|
part_detail: true,
|
||||||
|
manufacturer_detail: true,
|
||||||
|
active: true
|
||||||
|
}
|
||||||
|
},
|
||||||
description: {},
|
description: {},
|
||||||
supplier: { hidden: true }
|
supplier: {
|
||||||
|
hidden: true,
|
||||||
|
value: supplierId
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
line: {},
|
line: {},
|
||||||
|
|||||||
@@ -79,9 +79,11 @@ export default function SupplierPartDetail() {
|
|||||||
const data = supplierPart ?? {};
|
const data = supplierPart ?? {};
|
||||||
|
|
||||||
// Access nested data
|
// Access nested data
|
||||||
data.manufacturer = data.manufacturer_detail?.pk;
|
data.manufacturer =
|
||||||
data.MPN = data.manufacturer_part_detail?.MPN;
|
supplierPart.manufacturer || data.manufacturer_detail?.pk;
|
||||||
data.manufacturer_part = data.manufacturer_part_detail?.pk;
|
data.MPN = supplierPart.MPN || data.manufacturer_part_detail?.MPN;
|
||||||
|
data.manufacturer_part =
|
||||||
|
supplierPart.manufacturer_part || data.manufacturer_part_detail?.pk;
|
||||||
|
|
||||||
const tl: DetailsField[] = [
|
const tl: DetailsField[] = [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user