mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 21:25:42 +00:00 
			
		
		
		
	Detail and print view for the BOM report
This commit is contained in:
		| @@ -369,7 +369,15 @@ class BOMReportPrint(generics.RetrieveUpdateDestroyAPIView, PartReportMixin, Rep | ||||
|  | ||||
| report_api_urls = [ | ||||
|  | ||||
|     # Bill of Material reports | ||||
|     url(r'bom/', include([ | ||||
|  | ||||
|         # Detail views | ||||
|         url(r'^(?P<pk>\d+)/', include([ | ||||
|             url(r'print/?', BOMReportPrint.as_view(), name='api-bom-report-print'), | ||||
|             url(r'^.*$', BOMReportDetail.as_view(), name='api-bom-report-detail'), | ||||
|         ])), | ||||
|  | ||||
|         # List view | ||||
|         url(r'^.*$', BOMReportList.as_view(), name='api-bom-report-list'), | ||||
|     ])), | ||||
|   | ||||
| @@ -336,9 +336,12 @@ class BillOfMaterialsReport(ReportTemplateBase): | ||||
|     ) | ||||
|  | ||||
|     def get_context_data(self, request): | ||||
|  | ||||
|         part = self.object_to_print | ||||
|  | ||||
|         return { | ||||
|             'part': self.object_to_print, | ||||
|             'category': self.category, | ||||
|             'part': part, | ||||
|             'category': part.category, | ||||
|         } | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user