mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-27 18:18:46 +00:00
Fix for duplicating BOM
- Do not duplicate bom items which are "inherited"
This commit is contained in:
1 parent
bf63005731
commit
8caf6bad10
1 file changed
+1
-1
@@ -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!
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user