mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fixes for company serializer
This commit is contained in:
parent
298d870b44
commit
2ff9b23647
@ -31,6 +31,7 @@ import InvenTree.validators
|
||||
|
||||
import common.models
|
||||
import common.settings
|
||||
from common.settings import currency_code_default
|
||||
|
||||
|
||||
def rename_company_image(instance, filename):
|
||||
@ -149,6 +150,7 @@ class Company(models.Model):
|
||||
max_length=3,
|
||||
verbose_name=_('Currency'),
|
||||
blank=True,
|
||||
default=currency_code_default,
|
||||
help_text=_('Default currency used for this company'),
|
||||
validators=[InvenTree.validators.validate_currency_code],
|
||||
)
|
||||
|
@ -66,7 +66,10 @@ class CompanySerializer(InvenTreeModelSerializer):
|
||||
|
||||
currency = serializers.ChoiceField(
|
||||
choices=djmoney.settings.CURRENCY_CHOICES,
|
||||
default=currency_code_default,
|
||||
initial=currency_code_default,
|
||||
help_text=_('Default currency used for this supplier'),
|
||||
label=_('Currency Code'),
|
||||
required=True,
|
||||
)
|
||||
|
||||
class Meta:
|
||||
|
Loading…
Reference in New Issue
Block a user