mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-08 12:50:55 +00:00
Create BOM export form
- Select output format
This commit is contained in:
@@ -3,6 +3,8 @@ from __future__ import unicode_literals
|
||||
|
||||
from InvenTree.forms import HelperForm
|
||||
|
||||
from django import forms
|
||||
|
||||
from .models import Part, PartCategory, BomItem
|
||||
from .models import SupplierPart
|
||||
|
||||
@@ -16,6 +18,24 @@ class PartImageForm(HelperForm):
|
||||
]
|
||||
|
||||
|
||||
class BomExportForm(HelperForm):
|
||||
|
||||
# TODO - Define these choices somewhere else, and import them here
|
||||
format_choices = (
|
||||
('csv', 'CSV'),
|
||||
('xlsx', 'XLSX'),
|
||||
('pdf', 'PDF'),
|
||||
)
|
||||
|
||||
# Select export type
|
||||
format = forms.CharField(label='Format', widget=forms.Select(choices=format_choices), required='true', help_text='Select export format')
|
||||
|
||||
class Meta:
|
||||
model = Part
|
||||
fields = [
|
||||
]
|
||||
|
||||
|
||||
class EditPartForm(HelperForm):
|
||||
|
||||
class Meta:
|
||||
|
Reference in New Issue
Block a user