You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FR] BOM support for cut-to-length parts (profiles, cables, tubing) #10274
Please verify that this feature request has NOT been suggested before.
I checked and didn't find a similar feature request
Problem statement
I am trying to use InvenTree for production, and I have a case where a structural profile (e.g. extrusion 20×20) is cut to different lengths.
I would like to create a single Part, e.g. “Profile 20×20”, and then use it in a BOM where I specify the required cut lengths.
Currently, the BOM only has a single Quantity field. This works well for items that are counted in pieces, but not for items that are consumed in cut lengths.
Example: if I need 10 pieces of 250 mm, I don’t want to enter 10 separate BOM lines with “Profile 20×20” — that clutters the BOM.
If I only enter the total length (2.5 m) as Quantity, then the purchasing/production step will think I need a single 2.5 m piece, not 10 × 0.25 m pieces.
How do other users handle this situation today (cut-to-length parts like profiles, cables, tubing, etc.)?
Have there already been any discussions or Pull Requests related to this feature?
Suggested solution
Introduce two new optional fields on BOM items: Piece count and Piece size.
Piece count: number of pieces required.
Piece size: size/length/volume/mass of a single piece (depending on the unit of the Part).
The Quantity field would then be automatically calculated as Quantity = Piece count × Piece size
This approach preserves compatibility with existing BOM items that are used as whole units (where Piece size = 1), while allowing proper handling of cut-to-length or measured materials.
@TehDmitry thanks for raising the issue. There are always going to be limitations with regard to representing the "real world" manufacturing processes. Keep in mind that InvenTree keeps track of the required parts via the Bill of Materials - but not the manufacturing processes themselves.
If we were to add these two extra fields, there would be users who would then be looking for tracking of irregular size multiples, or some other edge case, which might require even more fields to represent.
With this in mind, I would suggest that it should be sufficient to either:
Have a single quantity entry (which is the total quantity required to build) and then use the "notes" field for the BOM entry to indicate that the "total quantity" must be broken down into smaller sections
Add a single entry for each shorter length (yes, a bit more tedious)
Rather than expanding the complexity of the BOM support (which then makes it harder to maintain and also for people to use in practice), I'd suggest trying to represent the data with the functionality already available. Typically the "manufacturing notes" / "build notes" would be stored elsewhere anyway
The feature request was not about managing the manufacturing process of cutting structural profiles, but about keeping track of the required parts for purchasing. Profiles are usually supplied by local vendors in the requested lengths.
The additional complexity in the BOM could be hidden from most users. For example, an extra button in the BOM form could reveal two extra fields (or just one field for “piece count”).
IMO, the “single entry for each shorter length” approach would actually increase workflow complexity. Even a small design change would require copy-pasting multiple parts and updating IDs in the CAD assembly.
However the Notes in each BOM line can handle chunk data. Even in JSON
I appreciate the time you saved me from spending on development
However, the Note field becomes unusable in the next steps — Manufacturing and Purchasing. I couldn’t find any place where BOM Notes are visible or aggregated for all required parts.
With the “BOM Note” approach, in order to buy a profile I would have to:
Find all active BOs with “chunk” Parts.
Open each BOM.
Multiply each chunk in each BOM by the BO quantity.
Group the data manually by IPN–length–count.
Only after that I could place an order.
This makes me a bit sad =\
Would it make sense to create a PR for this?
I think I would also need an is_chunk flag in the Part model to enable this aggregation logic only when required.
How do you draw it in CAD? one large chunk and a note to split it or multiple parts in the right length that then get referenced in instructions? I would use the same approach for the BOM
So the representation depends on the target ERP system.
My first PR was about importing existing UUIDs into BOMs by IPN.
Right now I’m trying to migrate from Odoo to InvenTree and at the same time make some of these processes more enjoyable.
Maybe there is a more efficient approach, but the current workflow is born from CAD API limitations.
I would not do any fancy chunking for the BOM but try to keep it relatively similar to CAD, especially for hardware.
Odom has by far more broad manufacturing capabilities, there will be loss of functionality.
While I understand the wish to make your specific workflow simpler I do not think the suggestions made here are thought-through and generalized enough for us to take on as a complexity, maintenance and documentation burden for the core system. Maybe this is a target for plugins support.
I’m a bit surprised that this kind of functionality hasn’t come up before — parts with a “length” parameter are common in many areas of manufacturing.
That said, with the ability to add Parts with the same PK in a single BOM, I can implement a plugin which groups BOM requirements and calculates the total quantity for placing real orders with suppliers. This approach adds a few extra steps, but it’s still easier and less error-prone than manually counting part chunks.
For now, I can’t provide any example of a friendly approach to storing length data while keeping proper DB normalization.
Maybe in the future, if the “chunk lobby” grows, we can come back to this topic and work on more generalized suggestions 🙂
In any case — thanks for building a core system that makes it possible to implement non-standard approaches on top of it
Finding some way to support more complex BOM structures and custom / made-to-order parts would be very interesting but I worry about increasing core complexity and how to document things.
Activity
SchrodingersGat commentedon Sep 6, 2025
@TehDmitry thanks for raising the issue. There are always going to be limitations with regard to representing the "real world" manufacturing processes. Keep in mind that InvenTree keeps track of the required parts via the Bill of Materials - but not the manufacturing processes themselves.
If we were to add these two extra fields, there would be users who would then be looking for tracking of irregular size multiples, or some other edge case, which might require even more fields to represent.
With this in mind, I would suggest that it should be sufficient to either:
Rather than expanding the complexity of the BOM support (which then makes it harder to maintain and also for people to use in practice), I'd suggest trying to represent the data with the functionality already available. Typically the "manufacturing notes" / "build notes" would be stored elsewhere anyway
TehDmitry commentedon Sep 6, 2025
The feature request was not about managing the manufacturing process of cutting structural profiles, but about keeping track of the required parts for purchasing. Profiles are usually supplied by local vendors in the requested lengths.
The additional complexity in the BOM could be hidden from most users. For example, an extra button in the BOM form could reveal two extra fields (or just one field for “piece count”).
IMO, the “single entry for each shorter length” approach would actually increase workflow complexity. Even a small design change would require copy-pasting multiple parts and updating IDs in the CAD assembly.
However the Notes in each BOM line can handle chunk data. Even in JSON
I appreciate the time you saved me from spending on development
TehDmitry commentedon Sep 6, 2025
Throughout the day I tried to find a solution using the existing functionality, but I couldn’t.
With #10268 I was able to import a BOM with chunks, for example:
However, the Note field becomes unusable in the next steps — Manufacturing and Purchasing. I couldn’t find any place where BOM Notes are visible or aggregated for all required parts.
With the “BOM Note” approach, in order to buy a profile I would have to:
Only after that I could place an order.
This makes me a bit sad =\
TehDmitry commentedon Sep 6, 2025
Alternatively, using the existing functionality (for data availability), I can split a single grouped row like this:
IPN, Quantity: 0.4, Note: [{"length": 100.0, "count": 2}, {"length": 200.0, "count": 1}]Split into 3 BOM lines:
This way, it becomes possible to aggregate the “chunked” BOM into a single table without changing the core BOM logic.
For example, an additional table could be displayed:
Example output:
Global table (after 4 pieces in BO):
BOM table (per item in BOM):
Would it make sense to create a PR for this?
I think I would also need an is_chunk flag in the Part model to enable this aggregation logic only when required.
matmair commentedon Sep 6, 2025
How do you draw it in CAD? one large chunk and a note to split it or multiple parts in the right length that then get referenced in instructions? I would use the same approach for the BOM
TehDmitry commentedon Sep 6, 2025
In my CAD design each component corresponds to a real-world part and is assigned a UUID.
For example:
{"ERP_UUID": "11111111-e92a-11ee-8d1e-001b21391651"}This UUID can be placed either in the component description or in the sketch name.
The length is treated as a computed property of the component, with the description ERP_Length.
Using a plugin, I can extract all components with their ERP_UUID and then generate a BOM in different formats depending on the ERP:
Grouped with chunk data in Notes:
or
Split into separate rows:
So the representation depends on the target ERP system.
My first PR was about importing existing UUIDs into BOMs by IPN.
Right now I’m trying to migrate from Odoo to InvenTree and at the same time make some of these processes more enjoyable.
Maybe there is a more efficient approach, but the current workflow is born from CAD API limitations.
matmair commentedon Sep 9, 2025
I would not do any fancy chunking for the BOM but try to keep it relatively similar to CAD, especially for hardware.
Odom has by far more broad manufacturing capabilities, there will be loss of functionality.
While I understand the wish to make your specific workflow simpler I do not think the suggestions made here are thought-through and generalized enough for us to take on as a complexity, maintenance and documentation burden for the core system. Maybe this is a target for plugins support.
TehDmitry commentedon Sep 9, 2025
I’m a bit surprised that this kind of functionality hasn’t come up before — parts with a “length” parameter are common in many areas of manufacturing.
That said, with the ability to add Parts with the same PK in a single BOM, I can implement a plugin which groups BOM requirements and calculates the total quantity for placing real orders with suppliers. This approach adds a few extra steps, but it’s still easier and less error-prone than manually counting part chunks.
For now, I can’t provide any example of a friendly approach to storing length data while keeping proper DB normalization.
Maybe in the future, if the “chunk lobby” grows, we can come back to this topic and work on more generalized suggestions 🙂
In any case — thanks for building a core system that makes it possible to implement non-standard approaches on top of it
3 remaining items
matmair commentedon Nov 24, 2025
still important
github-actions commentedon Jan 24, 2026
This issue seems stale. Please react to show this is still important.
matmair commentedon Jan 24, 2026
Finding some way to support more complex BOM structures and custom / made-to-order parts would be very interesting but I worry about increasing core complexity and how to document things.
feat: add piece_count and piece_size fields to BomItem for cut-to-le…
Matmair/issue12610 (#777)
SchrodingersGat commentedon Oct 17, 2026
Closed in #12422