From 8b3a49755419e25c10c31e1c03a914bfdddd26f0 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 29 Jun 2021 23:05:37 +1000 Subject: [PATCH] Remove unused Form --- InvenTree/company/forms.py | 36 -------------------------------- InvenTree/company/serializers.py | 2 ++ InvenTree/company/views.py | 2 +- 3 files changed, 3 insertions(+), 37 deletions(-) diff --git a/InvenTree/company/forms.py b/InvenTree/company/forms.py index 80673b4fa4..9da15a63e1 100644 --- a/InvenTree/company/forms.py +++ b/InvenTree/company/forms.py @@ -22,42 +22,6 @@ from .models import SupplierPart from .models import SupplierPriceBreak -class EditCompanyForm(HelperForm): - """ Form for editing a Company object """ - - field_prefix = { - 'website': 'fa-globe-asia', - 'email': 'fa-at', - 'address': 'fa-envelope', - 'contact': 'fa-user-tie', - 'phone': 'fa-phone', - } - - currency = django.forms.ChoiceField( - required=False, - label=_('Currency'), - help_text=_('Default currency used for this company'), - choices=[('', '----------')] + djmoney.settings.CURRENCY_CHOICES, - initial=currency_code_default, - ) - - class Meta: - model = Company - fields = [ - 'name', - 'description', - 'website', - 'address', - 'currency', - 'phone', - 'email', - 'contact', - 'is_supplier', - 'is_manufacturer', - 'is_customer', - ] - - class CompanyImageForm(HelperForm): """ Form for uploading a Company image """ diff --git a/InvenTree/company/serializers.py b/InvenTree/company/serializers.py index 3dd4e9334e..dd3175239b 100644 --- a/InvenTree/company/serializers.py +++ b/InvenTree/company/serializers.py @@ -6,6 +6,8 @@ from rest_framework import serializers from sql_util.utils import SubqueryCount +import djmoney.settings + from InvenTree.serializers import InvenTreeModelSerializer from InvenTree.serializers import InvenTreeImageSerializerField diff --git a/InvenTree/company/views.py b/InvenTree/company/views.py index 7d8440f9de..5a887d9d38 100644 --- a/InvenTree/company/views.py +++ b/InvenTree/company/views.py @@ -30,7 +30,7 @@ from .models import SupplierPriceBreak from part.models import Part -from .forms import EditCompanyForm, EditManufacturerPartParameterForm +from .forms import EditManufacturerPartParameterForm from .forms import CompanyImageForm from .forms import EditManufacturerPartForm from .forms import EditSupplierPartForm