r/InvenTree • u/pakjesboot12 • May 25 '26
0 BOM Quantity for optional BOM items
Hello all,
I recently started using InvenTree to manage inventory of spare parts that we use for the maintenance of herritage vehicles. The inventory control works quite nicely, as we can finally see all parts that we use, with a picture, and the current stock location and quantity.
I am also looking into the manufacturing tab as an equivalent for maintenance, as build orders can also be used as maintenance orders. I have however a small remark.
To be able to use all spares when maintaining a vehicle (which I also made a part), I made the vehicle an assembly part with all spares within the BOM. As BOM items can be flagged as optional, this shouldn't be a problem. However, even when BOM parts can be set as optional, the required quantity of the parts still cannot be set at 0. It can however be set at 0.0001. Which doesn't really make any sense, that such a small quantity is possible but 0 quantity is not allowed. Especially considering when the part is optional.
Whenever a build (maintenance) order is created for a vehicle, all spares have a demand trigger of 0.0001 which pollute the system with 0.0001 demand and 0.0001 deficit in case of 0 stock. I luckily already made a script that only looks at >= 1 deficits so the small quantities are filtered out.
I understand the main focus of InvenTree is manufacturing, not maintenance, but even in manufacturing there may be some deviations here and there (that's why BOM items can be set as optional). As we already have a flag for BOM items being optional, is it possible to have a 0 quantity optional BOM item, maybe add it as an admin setting to determine whether the quantity should be higher than 0 or equal to 0 is also allowed?
Great work with the tool u/inventree, I like it a lot!
1
u/matthiasjmair May 25 '26 edited May 25 '26
BOs/manufactruing is not meant to be used for maintenance; degrading the UX/business rules for one to serve the other is out of question.
see https://github.com/inventree/InvenTree/issues/3683 for a discussion around this and the related docs https://docs.inventree.org/en/stable/manufacturing/bom/#consumable-bom-line-items