mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +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
|
# Copy existing BOM items from another part
|
||||||
# Note: Inherited BOM Items will *not* be duplicated!!
|
# 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,
|
# If this part already has a BomItem pointing to the same sub-part,
|
||||||
# delete that BomItem from this part first!
|
# delete that BomItem from this part first!
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user