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 = [
|
report_api_urls = [
|
||||||
|
|
||||||
|
# Bill of Material reports
|
||||||
url(r'bom/', include([
|
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
|
# List view
|
||||||
url(r'^.*$', BOMReportList.as_view(), name='api-bom-report-list'),
|
url(r'^.*$', BOMReportList.as_view(), name='api-bom-report-list'),
|
||||||
])),
|
])),
|
||||||
|
@ -336,9 +336,12 @@ class BillOfMaterialsReport(ReportTemplateBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def get_context_data(self, request):
|
def get_context_data(self, request):
|
||||||
|
|
||||||
|
part = self.object_to_print
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'part': self.object_to_print,
|
'part': part,
|
||||||
'category': self.category,
|
'category': part.category,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user