mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 03:00:54 +00:00
Add setting to allow or prohibit duplicate IPN values
This commit is contained in:
@ -1247,12 +1247,21 @@ class StockItem(MPTTModel):
|
||||
|
||||
@property
|
||||
def required_test_count(self):
|
||||
"""
|
||||
Return the number of 'required tests' for this StockItem
|
||||
"""
|
||||
return self.part.getRequiredTests().count()
|
||||
|
||||
def hasRequiredTests(self):
|
||||
"""
|
||||
Return True if there are any 'required tests' associated with this StockItem
|
||||
"""
|
||||
return self.part.getRequiredTests().count() > 0
|
||||
|
||||
def passedAllRequiredTests(self):
|
||||
"""
|
||||
Returns True if this StockItem has passed all required tests
|
||||
"""
|
||||
|
||||
status = self.requiredTestStatus()
|
||||
|
||||
|
Reference in New Issue
Block a user