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

where one or more test report templates exist for a part,

provide a button for all stock-items of that part,
allowing the user to generate and download a test repotr
This commit is contained in:
Oliver Walters
2020-05-22 22:25:05 +10:00
parent 71681bfda1
commit e6f56cb056
7 changed files with 141 additions and 24 deletions

View File

@ -963,6 +963,13 @@ class StockItem(MPTTModel):
return result_map
def testResultList(self, **kwargs):
"""
Return a list of test-result objects for this StockItem
"""
return self.testResultMap(**kwargs).values()
def requiredTestStatus(self):
"""
Return the status of the tests required for this StockItem.