mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Detail and print view for the BOM report
This commit is contained in:
parent
9be2989971
commit
4e9b9ee6fd
@ -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,
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user