diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index de3b9bab2c..61bb9ec138 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -69,7 +69,7 @@ class Currency(models.Model): cur.save() # If there are no currencies set as the base currency, set this as base - if not Currency.objects.filter(base=True).exists(): + if not Currency.objects.exclude(pk=self.pk).filter(base=True).exists(): self.base = True # If this is the base currency, ensure value is set to unity diff --git a/InvenTree/templates/InvenTree/settings/currency.html b/InvenTree/templates/InvenTree/settings/currency.html index 2c7b3dbccb..712cd1700c 100644 --- a/InvenTree/templates/InvenTree/settings/currency.html +++ b/InvenTree/templates/InvenTree/settings/currency.html @@ -60,6 +60,13 @@ field: 'value', title: 'Value', sortable: true, + formatter: function(value, row, index, field) { + if (row.base) { + return "Base Currency"; + } else { + return value; + } + } }, { formatter: function(value, row, index, field) { diff --git a/Makefile b/Makefile index aaf795144e..7ea3f33b03 100644 --- a/Makefile +++ b/Makefile @@ -15,10 +15,11 @@ migrate: python3 InvenTree/manage.py makemigrations stock python3 InvenTree/manage.py makemigrations build python3 InvenTree/manage.py makemigrations order - python3 InvenTree/manage.py migrate - python3 InvenTree/manage.py migrate --run-syncdb + python3 InvenTree/manage.py makemigrations + cd InvenTree && python3 manage.py migrate + cd InvenTree && python3 manage.py migrate --run-syncdb python3 InvenTree/manage.py check - python3 InvenTree/manage.py collectstatic + cd InvenTree && python3 manage.py collectstatic # Install all required packages install: diff --git a/requirements.txt b/requirements.txt index a07aa8265f..cf45d83248 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,4 +14,5 @@ django-qr-code==1.0.0 # Generate QR codes flake8==3.3.0 # PEP checking coverage>=4.5.3 # Unit test coverage python-coveralls==2.9.1 # Coveralls linking (for Travis) -fuzzywuzzy>=0.17.0 # Fuzzy string matching \ No newline at end of file +fuzzywuzzy>=0.17.0 # Fuzzy string matching +python-Levenshtein>=0.12.0 # Required for fuzzywuzzy \ No newline at end of file