mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-05 13:10:57 +00:00
Refactor delete view for PartAttachment and StockItemAttachment
This commit is contained in:
@ -32,7 +32,7 @@ from datetime import datetime, timedelta
|
||||
|
||||
from company.models import Company, SupplierPart
|
||||
from part.models import Part
|
||||
from .models import StockItem, StockLocation, StockItemTracking, StockItemAttachment, StockItemTestResult
|
||||
from .models import StockItem, StockLocation, StockItemTracking, StockItemTestResult
|
||||
|
||||
import common.settings
|
||||
from common.models import InvenTreeSetting
|
||||
@ -255,22 +255,6 @@ class StockLocationQRCode(QRCodeView):
|
||||
return None
|
||||
|
||||
|
||||
class StockItemAttachmentDelete(AjaxDeleteView):
|
||||
"""
|
||||
View for deleting a StockItemAttachment object.
|
||||
"""
|
||||
|
||||
model = StockItemAttachment
|
||||
ajax_form_title = _("Delete Stock Item Attachment")
|
||||
ajax_template_name = "attachment_delete.html"
|
||||
context_object_name = "attachment"
|
||||
|
||||
def get_data(self):
|
||||
return {
|
||||
'danger': _("Deleted attachment"),
|
||||
}
|
||||
|
||||
|
||||
class StockItemAssignToCustomer(AjaxUpdateView):
|
||||
"""
|
||||
View for manually assigning a StockItem to a Customer
|
||||
|
Reference in New Issue
Block a user