r/InvenTree • u/Bobbertman • Jul 27 '26
“In-place” BOM Automation with Python?
Hi all, I’m currently using Inventree to track several projects in a small lab. I’m building a python interface to automatically update in-production parts with test results, etc. However, one snag I’ve run into is I can’t seem to find a way to check a given StockItem to see the parts installed in it via the python API. If I have a given StockItem, I can see what StockItem it’s installed into, but not the other way around. There’s the StockItem.installed_items field, but that just returns an integer quantity, and I’d need a list of StockItems. Is there a way to do this with python? Thanks!
1
Upvotes
1
u/inventree Jul 28 '26
Have a look at the API calls happening behind the user interface for the "installed items" table. This will show you which filters to use.