mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-10 05:40:55 +00:00
Save the selected BOM data
This commit is contained in:
@@ -671,6 +671,13 @@ class Part(models.Model):
|
||||
|
||||
self.save()
|
||||
|
||||
@transaction.atomic
|
||||
def clear_bom(self):
|
||||
""" Clear the BOM items for the part (delete all BOM lines).
|
||||
"""
|
||||
|
||||
self.bom_items.all().delete()
|
||||
|
||||
def required_parts(self):
|
||||
""" Return a list of parts required to make this part (list of BOM items) """
|
||||
parts = []
|
||||
|
Reference in New Issue
Block a user