mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-02 05:26:45 +00:00
Fix for stock item edit (#8451)
- Pass stockItem instance through to form
This commit is contained in:
parent
011108cb50
commit
8f24119f29
@ -536,6 +536,7 @@ export default function StockDetail() {
|
||||
|
||||
const editStockItemFields = useStockFields({
|
||||
create: false,
|
||||
stockItem: stockitem,
|
||||
partId: stockitem.part
|
||||
});
|
||||
|
||||
|
@ -414,12 +414,15 @@ export function StockItemTable({
|
||||
};
|
||||
}, [table]);
|
||||
|
||||
const stockItemFields = useStockFields({ create: true, partId: params.part });
|
||||
const newStockItemFields = useStockFields({
|
||||
create: true,
|
||||
partId: params.part
|
||||
});
|
||||
|
||||
const newStockItem = useCreateApiFormModal({
|
||||
url: ApiEndpoints.stock_item_list,
|
||||
title: t`Add Stock Item`,
|
||||
fields: stockItemFields,
|
||||
fields: newStockItemFields,
|
||||
initialData: {
|
||||
part: params.part,
|
||||
location: params.location
|
||||
|
Loading…
x
Reference in New Issue
Block a user