Manufacturer name in Part/Stock item label #2983
-
I am setting up an inventory system for my home lab/office. I took a look through the Part model i see no way of accessing the corresponding Manufacturer/company which then contains the name field i'd be interested in. Is there a way to do this as of now when using the label templates? Thank you for your help in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
The ManufacturerPart model links between a From the context of a
But it really depends on exactly what you are trying to do. I think it sounds more likely that you are looking to label a So, if you are printing a label for a
|
Beta Was this translation helpful? Give feedback.
The ManufacturerPart model links between a
Part
andCompany
(manufacturer) instance in the database.From the context of a
Part
you could iterate through the linkedManufacturerPart
items:But it really depends on exactly what you are trying to do.
I think it sounds more likely that you are looking to label a
StockItem
rather than aPart
? In this case, eachStockItem
instance can link directly to aSupplierPart
which can in turn reference aManufacturerPart
.So, if you are printing a label for a
StockItem
, within that context you could do something like: