Enable the association of inventory item templates with component templates

This commit is contained in:
jeremystretch
2021-12-29 16:30:44 -05:00
parent 4c15f4a84f
commit 791cc093f4
6 changed files with 40 additions and 27 deletions

View File

@@ -1379,6 +1379,7 @@ class InventoryItemTemplateCreateView(generic.ComponentCreateView):
queryset = InventoryItemTemplate.objects.all()
form = forms.DeviceTypeComponentCreateForm
model_form = forms.InventoryItemTemplateForm
template_name = 'dcim/inventoryitem_create.html'
def alter_object(self, instance, request):
# Set component (if any)