Parameters for stock items #11423
Replies: 3 comments 3 replies
-
|
I am not sure using the "normal" mechanism as exposed by the mixin is correct for StockItem. This would lead to the potential for having differing parameter templates available on stock items of the same part. |
Beta Was this translation helpful? Give feedback.
-
|
I'd like to second this proposal. My use case would be to track MAC addresses, IMEI numbers and possibly default credentials, which are associated with particular S/N, not P/N, and print all of them on a label. Example of a product that has two different labels, with and without secrets (inside and outside of the packaging): https://wiki.teltonika-networks.com/view/RUT200_Product_Labels |
Beta Was this translation helpful? Give feedback.
-
|
Ref: #11459 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
With the new generic parameter system introduced in 1.2, it looks like stock items could have parameters added pretty easily. I have a few use cases where I'd like to be able to pin some internal meta data to stock items. Regardless of my use case, I could see having the ability to attach user-defined meta data via parameters to stock items as useful and consistent with the new generic parameters concept.
For scope of effort, I think this would entail adding the
InvenTree.models.InvenTreeParameterMixinto theStockItemmodel in the backend (not sure there is much else to do; the generic param system looks well thought out). On the front end (disclaimer: I have little front end experience) I'm guessing it should largely be a "copy-paste" to add the param UI to stock item, and maybe some tweaks in the admin center around the parameter template management (maybe this comes for free?).A couple questions
I'd consider taking a stab at a PR if the feature is in line with the project.
Beta Was this translation helpful? Give feedback.
All reactions