Skip to content

[FR] Part-Level substitutes #11202

Open

Description

@gravityshuffle

Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find a similar feature request

Problem statement

We have BOMs with parts like

MLCC, 100nF, 6.3V, 20%, X5R, 0402
MLCC, 100nF, 10V, 20%, X5R, 0402
MLCC, 100nF, 35V, 20%, X5R, 0402
MLCC, 100nF, 50V, 20%, X5R, 0402

but for prototyping they might all be substituted by

MLCC, 100nF, 50V, 10%, X7R, 0402

or whatever we have in stock in-house.

Currently we manually add the substitutes when importing the BOM into InvenTree, which is labor intensive and error prone.

Suggested solution

Our idea of a solution would be the following:

  • (1) General substitutes on a Part-Level
    • e.g. the part MLCC, 100nF, 10V, 20%, X5R, 0402 can ALLWAYS be substituted by MLCC, 100nF, 50V, 10%, X7R, 0402. Under /web/part/1234/substitutes we we can add MLCC, 100nF, 50V, 10%, X7R, 0402 and others. If a BOM is created containing MLCC, 100nF, 10V, 20%, X5R, 0402 all substitutes can be added automatically. Image
      You could also split the section in two and have a "Can be substituted by X" and "Substitutes X" section, to be show both the substitutes and the parts the current part is substituting.
  • (Moved to [FR] Allow for BOM-line substitutes to be importet too during BOM import #11254) (2) The ability import substitutes from the bom.csv
    • Allow for BOMs to be imported to conatin a field like ComponentSubstitutes with a list of ids of Parts that can substitute the actual part.
Component;ComponentSubstitutes;
1234;1500,1650,2120,;
1240;1500,1650,2120,;
1300;1500,1650,2120,;
1500;1650,;

or

Component; ... ;ComponentSubstitutes;
MLCC, 100nF, 6.3V, 20%, X5R, 0402; ... ;MLCC, 100nF, 50V, 20%, X5R, 0402,MLCC, 100nF, 50V, 20%, X5R, 0402,MLCC, 100nF, 35V, 10%, X5R, 0402
MLCC, 100nF, 10V, 20%, X5R, 0402; ... ;MLCC, 100nF, 50V, 20%, X5R, 0402,MLCC, 100nF, 50V, 10%, X7R, 0402,MLCC, 100nF, 35V, 10%, X5R, 0402
MLCC, 100nF, 35V, 20%, X5R, 0402; ... ;MLCC, 100nF, 50V, 20%, X5R, 0402,MLCC, 100nF, 50V, 10%, X7R, 0402,MLCC, 100nF, 35V, 10%, X5R, 0402
MLCC, 100nF, 50V, 20%, X5R, 0402; ... ;MLCC, 100nF, 50V, 10%, X7R, 0402

I have posted this in #10777.

Describe alternatives you've considered

Currently we manually substitute when importing the BOM into InvenTree.

Examples of other systems

No response

Do you want to develop this?

  • I want to develop this.

Activity

  1. added
    enhancement
    triage:not-checked
    on Jan 26, 2026
  2. changed the title [-][FR] title[/-] [+][FR] Part-Level substitutes[/+] on Jan 26, 2026
  3. SchrodingersGat commented on Jan 27, 2026

    @SchrodingersGat
    Member

    This idea has merit, although it would require a substantial amount of work to implement. In particular, we calculate the availability of a particular part dynamically, and this is used to determine how much of a particular assembly we can build at any given time.

    Adding in part-level substitutes would greatly increase the complexity of these calculations. We would probably have to consider caching part requirements also.

  4. modified the milestones: 1.2.0, 2.0.0 on Jan 27, 2026
  5. added
    area/BOM
    and removed
    triage:not-checked
    on Jan 27, 2026
  6. matmair commented on Jan 27, 2026

    @matmair
    Member

    I like this idea in general; we will have to refactor the whole substitution/BOM logic anyway for #11211 so this might be interesting to include

    Some questions that come to mind:

    1. How does a change of substitutes on a part influence the BOMs that the part is used in? Does it trigger a new revision of the BOM?; is it inherited?
    2. Are those substitutes copied over to the BOM-line substitutes when added to a BOM?
    3. Are the part substitutes changed / recommended for change when a BOM-line receives a new substitute?
    4. How does this mesh with [FR] Option to bulk replace obsolete part in BOM #10777 ?
  7. gravityshuffle commented on Feb 3, 2026

    @gravityshuffle
    Author
    1. How does a change of substitutes on a part influence the BOMs that the part is used in? Does it trigger a new revision of the BOM?

    It would change the substitutes in the BOM. I don't know if it should trigger a revision. The use case would be:
    I have the not-in-stock part MLCC, 100nF, 10V, 20%, X5R, 0402 (A) which is substituted on a part-level with the in-stock part MLCC, 100nF, 50V, 10%, X7R, 0402 (B). There are many BOMs using (A). When I view one of those BOMs it shows automatically that (B) is a substitute. Now (B) runs low and we acquire MLCC, 100nF, 35V, 20%, X5R, 0402 (C) and add it to the part-level substitutes of (A). If I now look at the BOMs it should show (B) and (C) as a substitute.

    is it inherited?

    That would be great but not necessary. You could have a checkbox on part creation or edit whether to inherit substitutes from substitutes.

    1. Are those substitutes copied over to the BOM-line substitutes when added to a BOM?

    There could be "manual" BOM-line substitutes and "automatic" BOM-line substitutes. The former are the current substitutes, the latter are the part-level substitutes. Both could show up in the Substututes and Available Stock column of BOM-lines but if I click Edit Substitutes it either only shows the "manual" substitutes or it shows both but the "automatic" substitutes are marked as read only.

    Image
    1. Are the part substitutes changed / recommended for change when a BOM-line receives a new substitute?

    I would say they are not recommended but always added automatically. Maybe if you add a new BOM-line you have a checkbox to disallow part-level substitutes.

    1. How does this mesh with [FR] Option to bulk replace obsolete part in BOM #10777 ?

    I would agree with you in #10777 and say they are separate features. @ram-bt wants to bulk edit all boms to remove an obsolete part and replace it with a entirely new part.
    I want the substitutes to adjust automatically via part-level substitutes. If my idea is implemented they could of course go to the obsolete part and add the new part as a part-level substitude. All BOMs will still show the obsolete part but in a build order the new part could be used (I don't know how it works when you have an inaktive part in a bom and a active substitude. Will InvenTree always choose the active substitude?). The obsolete part will of course forever remain the BOM-line part The change also cannot be selective. They are talking about a preview list. Maybe they want to manually unselect certain BOMs.

  8. gravityshuffle commented on Feb 3, 2026

    @gravityshuffle
    Author

    My feature request is compound. Both part-level substitutes and the ability to add substitutes during csv BOM import would be helpful for our use case but they are different features. The latter would be easier to implement I assume. Should I open another FR for allowing adding substitutes during csv BOM import?

  9. matmair commented on Feb 3, 2026

    @matmair
    Member

    What you are proposing would remove the deterministic nature of BOMs, BOMs could not be validated anymore as the substitutes could change at any moment (even in error or malice). I do not think that is a good idea. @SchrodingersGat what is your opinion on that? Especially

    I want the substitutes to adjust automatically via part-level substitutes. If my idea is implemented they could of course go to the obsolete part and add the new part as a part-level substitude. All BOMs will still show the obsolete part but in a build order the new part could be used

  10. matmair commented on Feb 3, 2026

    @matmair
    Member

    Should I open another FR for allowing adding substitutes during csv BOM import?

    @tounho yes please; one request per FR; especially as I am not sure this one is getting implemented any time soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/BOMenhancement

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions