mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Allow more file formats for BOM import
This commit is contained in:
parent
9c84e9076f
commit
2bc97764c7
@ -10,13 +10,13 @@ import os
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.core.exceptions import ValidationError
|
||||
|
||||
from InvenTree.helpers import DownloadFile
|
||||
from InvenTree.helpers import DownloadFile, GetExportFormats
|
||||
|
||||
|
||||
def IsValidBOMFormat(fmt):
|
||||
""" Test if a file format specifier is in the valid list of BOM file formats """
|
||||
|
||||
return fmt.strip().lower() in ['csv', 'xls', 'xlsx', 'tsv']
|
||||
return fmt.strip().lower() in GetExportFormats()
|
||||
|
||||
|
||||
def MakeBomTemplate(fmt):
|
||||
|
Loading…
Reference in New Issue
Block a user