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:
parent
66ecb1c9ff
commit
e16eb4a94d
|
|
@ -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[] = [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue