2
0
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:
Oliver Walters
2019-05-02 17:29:21 +10:00
parent 505191089f
commit 6e8c1bcc84
9 changed files with 155 additions and 45 deletions

View File

@@ -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 """