mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-03 04:00:57 +00:00
Add verbose names for multiple Build model fields
- Improve methods for different models
This commit is contained in:
@ -426,6 +426,14 @@ class StockItem(MPTTModel):
|
||||
|
||||
return self.build_allocation_count() + self.sales_order_allocation_count()
|
||||
|
||||
def unallocated_quantity(self):
|
||||
"""
|
||||
Return the quantity of this StockItem which is *not* allocated
|
||||
"""
|
||||
|
||||
return max(self.quantity - self.allocation_count(), 0)
|
||||
|
||||
|
||||
def can_delete(self):
|
||||
""" Can this stock item be deleted? It can NOT be deleted under the following circumstances:
|
||||
|
||||
|
Reference in New Issue
Block a user