2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-20 22:06:28 +00:00

Add functions to test if a stock item has passed all tests

This commit is contained in:
Oliver Walters
2020-05-17 22:03:55 +10:00
parent 5f318799c1
commit 6cb017bbfd
4 changed files with 117 additions and 1 deletions

View File

@ -1009,6 +1009,10 @@ class Part(MPTTModel):
tests = tests.filter(required=required)
return tests
def getRequiredTests(self):
# Return the tests which are required by this part
return self.getTestTemplates(required=True)
@property
def attachment_count(self):