In continuation to my recent effort of setting up InvenTree to organize my electronics parts properly and creating the GetParts tool to help me register my components to InvenTree, I ran into another problem: printing labels.
InvenTree allows creating so called stock items of parts, which represent an actual physical instance of a part that I own. These stock items can then be organized in stock locations, which can be nested. This way I can accurately represent how many items of which parts I actually own, and where they are stored. However, with many parts it can quickly become difficult to identify the physical items.
As I explained in my last blog post, one of my most important use cases of InvenTree is managing my components from Mouser. These come in bags with labels, that even have barcodes for scanning with the InvenTree app. Such codes are very useful for identifying an individual item or to quickly note down in the app when I use up parts from a bag.
But not all items have such labels yet, and besides, I might also want to have consistent labels with the basic information I need everywhere, or even labels on my stock locations so it's easier to identify the exact drawer an item is actually located in.
Clearly, we need to print our own labels. Luckily, InvenTree supports generating labels with customizable templates for all objects. There's only one problem: I don't have a label printer. But what I do have, is a standard office printer along with a few different kinds of A4-sized, precut multiple label sheets.
So now, only one problem was left to be solved: While InvenTree does support label sheet printing by default, it simply aligns all labels on the top left corner of the page and squeezes them together as tightly as possible for use with full sheet label paper. There is no way to align these labels, so that they are printed in the correct location for precut label sheets. Since I felt this was a valuable missing feature (after all I needed it), I decided to create my own label printing plugin which does exactly this, and also a couple of other handy features that came to mind. It's called the InvenTree Advanced Sheet Label printing plugin. Check it out on the InvenTree plugin index, on GitHub or on PyPi to see how to install it and what it can do. Maybe you have a use for it too. And if you have sheet layouts to contribute, see how to do so on GitHub. Any contributions are welcome!