diff --git a/InvenTree/InvenTree/views.py b/InvenTree/InvenTree/views.py index 041603f7fb..9d5e1a2dc4 100644 --- a/InvenTree/InvenTree/views.py +++ b/InvenTree/InvenTree/views.py @@ -245,6 +245,7 @@ class AjaxCreateView(AjaxMixin, CreateView): # Return the PK of the newly-created object data['pk'] = obj.pk + data['text'] = str(obj) try: data['url'] = obj.get_absolute_url() diff --git a/InvenTree/part/views.py b/InvenTree/part/views.py index fef88197f7..55482d3284 100644 --- a/InvenTree/part/views.py +++ b/InvenTree/part/views.py @@ -202,6 +202,7 @@ class PartDuplicate(AjaxCreateView): part = form.save() data['pk'] = part.pk + data['text'] = str(part) deep_copy = str2bool(request.POST.get('deep_copy', False)) @@ -321,6 +322,7 @@ class PartCreate(AjaxCreateView): part = form.save() data['pk'] = part.pk + data['text'] = str(part) try: data['url'] = part.get_absolute_url()