mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix for duplicating BOM
- Do not duplicate bom items which are "inherited"
This commit is contained in:
parent
bf63005731
commit
8caf6bad10
@ -1524,7 +1524,7 @@ class Part(MPTTModel):
|
||||
|
||||
# Copy existing BOM items from another part
|
||||
# Note: Inherited BOM Items will *not* be duplicated!!
|
||||
for bom_item in other.bom_items.all():
|
||||
for bom_item in other.get_bom_items(include_inherited=False).all():
|
||||
# If this part already has a BomItem pointing to the same sub-part,
|
||||
# delete that BomItem from this part first!
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user