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:
parent
a30e478412
commit
aeb9dfe371
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user