Validation Mixin implementation with part category-level settings #4389
Unanswered
janujarerat
asked this question in
Q&A
Replies: 2 comments
-
This is currently not possible, the ValidationMixin has no concept of part information, it only gets passed the next serial number. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@janujarerat your idea is a good one, but currently not possible due to the way in which validation plugins work. I've made PR here - #4391 - which will add some extra functionality. The sample validation plugin should give you a good idea of how to start. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm pretty new to the plugin ecosystem, and I'm wondering if the feature that I want to implement in our InvenTree installation is even possible through the use of the ValidationMixin plugin.
We want to have custom batch-code generation functionality specific to the part category associated with a new stock item (ie. each part category has a batch code with a unique prefix). I envisioned an admin user would be able to set batch code generation templates for each part category following some kind of custom syntax.
Unfortunately, I'm a little confused where to start with this. I've been looking through the Validation Mixin sample as a reference, but am wondering how to incorporate information from the database (in this case part categories) as plugin settings and additional validation fields for batch code validation. Would it be possible to implement this kind of functionality through a plugin mixin?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions