inventree / InvenTree

Open Source Inventory Management System
https://docs.inventree.org
MIT License
4.33k stars 784 forks source link

[FR] Custom parameters for BOM-Items #2035

Closed lekalt closed 1 year ago

lekalt commented 3 years ago

Is your feature request the result of a bug? -

Problem I am using InvenTree to manage electrical parts and PCB's (by BOM). The offered solution "PartParameters" / "PartParameterTemplates" is great but seems to be missing for BOM-Items. A similar feature would be great for adding part-independent parameters to BOM-Items (e.g.: alternative part(s) with preference, is_fitted, etc. ).

Suggested solution As described in the "Problem"-section: A similar feature to the PartParameters / PartParameterTemplates for BOM-Items would be great!

Describe alternatives you've considered If there is a workaround for this, I would consider this an option.

Examples of other systems -

Do you want to develop this? If you can give me a starting point, I can give it a try by myself. But your help would be much appreciated! 😄

eeintech commented 3 years ago

@lekalt A lot of this can be done with the current system. Could you please give a real-life example of BOM using those parameters?

SchrodingersGat commented 3 years ago

A worked example would be great to help understand what you're trying to achieve :)

lekalt commented 3 years ago

Thank you very much for your fast reply and sorry for the time it took for mine... Here is the requested example:

ID Category Description BOM Position Alternative category Preference Fitted Type Quantity Value Specification Manufacturer Manufacturer number Casing Designator
100 Resistor Resistor 1k2, 0805 1 C 0 yes SMD 1 1k2 125mW/1% 0805 R1
101 Resistor Resistor 75R, 0805 2 C 0 yes SMD 1 75R 125mW/1% 0805 R2
102 Capacitor Ceramic Capacitor 10nF / 50V / 0805 3 C 0 yes SMD 2 10nF 50V/X7R/10% 0805 C1, C2
103 Hall sensor Detector TLI 4906L, THT 4 A 0 yes THT 1 Infineon TLI4906L SSO-3 IC1
104 Connector Connector ZIF 10pol. 5 A 0 yes SMD 1 Amphenol FCI SFW10R-1STE9LF ST1
105 Connector Connector SMD 4pol. 6 A 0 yes SMD 1 Würth Elektronik 620 104 131 822 ST2
106 Connector Connector JST PH, 4 polig, 2mm Pitch 6 A 1 yes SMD 1 JST S4B-PH-SM4-TB ST2
107 PCB PCB 7 A 0 yes PCB 1 Leiton 141000621
eeintech commented 3 years ago

@lekalt All information shown can already be exported, make sure to toggle all options:

image

lekalt commented 3 years ago
@eeintech I toggled all options. Still I am missing an option for an Item e.g. BOM-Position 6: ID Category Description BOM Position Alternative category Preference Fitted Type Quantity Value Specification Manufacturer Manufacturer number Casing Designator
105 Connector Connector SMD 4pol. 6 A 0 yes SMD 1 Würth Elektronik 620 104 131 822 ST2
106 Connector Connector JST PH, 4 polig, 2mm Pitch 6 A 1 yes SMD 1 JST S4B-PH-SM4-TB ST2

Three things are important here:

  1. ID106 is an alternative Part. Every part comes with a preference (1). The item with the lowest number is to prefer
  2. ID106's category is "A" (which is a code for the manufacturer). This is part independent - it only depends on the BOM
  3. I need a column for the "BOM Position" which is used to refer on changes, etc.

At the moment I don’t see any way to meet these requirements. Am I missing something?

eeintech commented 3 years ago

@lekalt Here's is how I see it:

  1. Alternative parts should be on the same line/row, with the same ID. Which is why you can have multiple supplier/manufacturer parts per part in InvenTree. What you are trying to do is prioritize them in order of appearance by column, it shouldn't be by row. I think that supplier parts exported to BOM are currently sorted by date they were created. Could be a nice-to-have feature to sort them by another field, like a priority field. But honestly that's a lot of work that can be done manually on the spreadsheet after export.
  2. No idea what this manufacturer category field refers to, never seen it in before. Can you point towards documentation or reading that explain the use of "category" for suppliers or manufacturers?
  3. I am not grasping that one either, how is this number used in practice? How can one single digit code "changes, etc."? What do you get from knowing this number is 6 instead of any other digit?
lekalt commented 3 years ago

@eeintech Thank's for your ideas! Probably this explains my problem better: https://www.altium.com/documentation/altium-designer/bom-management-with-activebom-ad#!including-an-alternative-part

I need custom parameters in the BOM independent from the part. The alternative parts aren't the same part from different manufacturers. The only thing the parts have in common is the BOM Position. -> The modifications and additional parameters can/should only be made in the BOM, not at the part itself.

I think two additional features in InvenTree could make this possible: 1) A alternative part Parameter which links two parts only in a single BOM (same BOM Position, new row -> different ID) 2) The possibility to add custom parameters (e.g.: manufacturer category, priority, ...)

Is there any chance to implement this?

Thank you very much for your effort!!! 😄

SchrodingersGat commented 3 years ago

The concept of an "alternative part" is one that has been discussed here before. I think there would be a good case for it, although it would be somewhat difficult (not impossible) to implement.

Can you explain a bit more what "category" and "priority" mean in the context of a BOM here?

eeintech commented 3 years ago

@lekalt Honestly all those features you are referring to shouldn't be in InvenTree because in-depth BoM management tools and processes like sourcing splits is its own beast. What you want is to use your CAD tool or a paid PLM tool to generate your final BoMs. And then those BoMs are imported straight into InvenTree. No need to add parameters or anything of this sort, the BoM in InvenTree should be a frozen image of your project's BoM including the mixins from your CAD/PLM tool.

matmair commented 3 years ago

@eeintech I am with you in this, this is a PLM function for sure. The question is if we can support this with plugins that add functions on top of BOMs / parts.

eeintech commented 3 years ago

@matmair Anything can be done with time and effort, however InvenTree has to pick its battles to not become a huge uncontrolled "monster". And I don't know that this one is worth fighting for at this moment, a lot of other aspects sound more important IMO.

eeintech commented 3 years ago

For instance, support for part revisions would be a much greater addition. It was in the back of my mind for a while now, maybe one day I'll give it a shot as it's quite annoying to have to spin-off a new/duplicate part each time for each project/circuit revision.

matmair commented 3 years ago

@eeintech my suggestion was not that one of the core contributors does it but I would be willing to assist @lekalt or anyone else willing to implement it - preferably as a plugin.

matmair commented 1 year ago

@lekalt alternative parts are implemented now, can we close this?

SchrodingersGat commented 1 year ago

Closing due to inactivity, but feel free to ping us again @lekalt