2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-05 06:48:48 +00:00

Allows deletion of serialized stock

This commit is contained in:
Oliver 2022-03-01 23:58:30 +11:00
parent a30e478412
commit aeb9dfe371

View File

@ -909,7 +909,6 @@ class StockItem(MPTTModel):
""" Can this stock item be deleted? It can NOT be deleted under the following circumstances: """ Can this stock item be deleted? It can NOT be deleted under the following circumstances:
- Has installed stock items - Has installed stock items
- Has a serial number and is tracked
- Is installed inside another StockItem - Is installed inside another StockItem
- It has been assigned to a SalesOrder - It has been assigned to a SalesOrder
- It has been assigned to a BuildOrder - It has been assigned to a BuildOrder
@ -918,9 +917,6 @@ class StockItem(MPTTModel):
if self.installed_item_count() > 0: if self.installed_item_count() > 0:
return False return False
if self.part.trackable and self.serial is not None:
return False
if self.sales_order is not None: if self.sales_order is not None:
return False return False