|
|
@@ -695,6 +695,9 @@ class ManufacturerView(generic.ObjectView):
|
|
|
).annotate(
|
|
|
instance_count=count_related(Device, 'device_type')
|
|
|
)
|
|
|
+ inventory_items = InventoryItem.objects.restrict(request.user, 'view').filter(
|
|
|
+ manufacturer=instance
|
|
|
+ )
|
|
|
|
|
|
devicetypes_table = tables.DeviceTypeTable(devicetypes)
|
|
|
devicetypes_table.columns.hide('manufacturer')
|
|
|
@@ -702,6 +705,7 @@ class ManufacturerView(generic.ObjectView):
|
|
|
|
|
|
return {
|
|
|
'devicetypes_table': devicetypes_table,
|
|
|
+ 'inventory_item_count': inventory_items.count(),
|
|
|
}
|
|
|
|
|
|
|