2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 05:25:42 +00:00

Inline deletion for BOM items

This commit is contained in:
Oliver
2018-04-27 00:54:01 +10:00
parent 507e3de05b
commit 5162c1d11f
10 changed files with 134 additions and 109 deletions

View File

@ -205,19 +205,21 @@ class BomItemEdit(AjaxUpdateView):
ajax_form_title = 'Edit BOM item'
class BomItemDelete(DeleteView):
class BomItemDelete(AjaxDeleteView):
model = BomItem
template_name = 'part/bom-delete.html'
context_object_name = 'item'
ajax_form_title = 'Confim BOM item deletion'
success_url = '/part'
#success_url = '/part'
"""
def post(self, request, *args, **kwargs):
if 'confirm' in request.POST:
return super(BomItemDelete, self).post(request, *args, **kwargs)
else:
return HttpResponseRedirect(self.get_object().get_absolute_url())
"""
class SupplierPartDetail(DetailView):
model = SupplierPart