mirror of
https://github.com/inventree/InvenTree.git
synced 2026-05-09 11:08:54 +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: {
|
||||
part: {},
|
||||
part: {
|
||||
filters: {
|
||||
active: true,
|
||||
purchaseable: true
|
||||
}
|
||||
},
|
||||
SKU: {},
|
||||
manufacturer_part: {
|
||||
filters: {
|
||||
part_detail: true,
|
||||
manufacturer_detail: true,
|
||||
active: true
|
||||
}
|
||||
},
|
||||
description: {},
|
||||
supplier: { hidden: true }
|
||||
supplier: {
|
||||
hidden: true,
|
||||
value: supplierId
|
||||
}
|
||||
}
|
||||
},
|
||||
line: {},
|
||||
|
||||
@@ -79,9 +79,11 @@ export default function SupplierPartDetail() {
|
||||
const data = supplierPart ?? {};
|
||||
|
||||
// Access nested data
|
||||
data.manufacturer = data.manufacturer_detail?.pk;
|
||||
data.MPN = data.manufacturer_part_detail?.MPN;
|
||||
data.manufacturer_part = data.manufacturer_part_detail?.pk;
|
||||
data.manufacturer =
|
||||
supplierPart.manufacturer || data.manufacturer_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[] = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user