mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-08 12:50:55 +00:00
Add views to Create / Edit / Delete a PartAttachment
- Buttons to edit or delete existing attachments - Button to add a new attachment - Fixed conflicting migrations
This commit is contained in:
@@ -9,7 +9,8 @@ from InvenTree.forms import HelperForm
|
||||
|
||||
from django import forms
|
||||
|
||||
from .models import Part, PartCategory, BomItem
|
||||
from .models import Part, PartCategory, PartAttachment
|
||||
from .models import BomItem
|
||||
from .models import SupplierPart
|
||||
|
||||
|
||||
@@ -44,6 +45,18 @@ class BomExportForm(HelperForm):
|
||||
]
|
||||
|
||||
|
||||
class EditPartAttachmentForm(HelperForm):
|
||||
""" Form for editing a PartAttachment object """
|
||||
|
||||
class Meta:
|
||||
model = PartAttachment
|
||||
fields = [
|
||||
'part',
|
||||
'attachment',
|
||||
'comment'
|
||||
]
|
||||
|
||||
|
||||
class EditPartForm(HelperForm):
|
||||
""" Form for editing a Part object """
|
||||
|
||||
|
Reference in New Issue
Block a user