Allow more file formats for BOM import

This commit is contained in:
Oliver Walters 2019-09-15 19:45:59 +10:00
parent 9c84e9076f
commit 2bc97764c7

View File

@ -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):