2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 19:20:55 +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

@ -100,7 +100,7 @@ class ReportTemplateBase(models.Model):
"""
def __str__(self):
return os.path.basename(self.template.name)
return "{n} - {d}".format(n=self.name, d=self.description)
def getSubdir(self):
return ''
@ -218,7 +218,8 @@ class TestReport(ReportTemplateBase, PartFilterMixin):
def get_context_data(self, request):
return {
'stock_item': self.stock_item,
'results': self.stock_item.testResultMap()
'results': self.stock_item.testResultMap(),
'result_list': self.stock_item.testResultList()
}