mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 19:46:46 +00:00
Merge pull request #484 from SchrodingersGat/leven
Install package for fast string matching
This commit is contained in:
commit
dfb0f67b87
@ -69,7 +69,7 @@ class Currency(models.Model):
|
|||||||
cur.save()
|
cur.save()
|
||||||
|
|
||||||
# If there are no currencies set as the base currency, set this as base
|
# 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
|
self.base = True
|
||||||
|
|
||||||
# If this is the base currency, ensure value is set to unity
|
# If this is the base currency, ensure value is set to unity
|
||||||
|
@ -60,6 +60,13 @@
|
|||||||
field: 'value',
|
field: 'value',
|
||||||
title: 'Value',
|
title: 'Value',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
formatter: function(value, row, index, field) {
|
||||||
|
if (row.base) {
|
||||||
|
return "Base Currency";
|
||||||
|
} else {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
|
7
Makefile
7
Makefile
@ -15,10 +15,11 @@ migrate:
|
|||||||
python3 InvenTree/manage.py makemigrations stock
|
python3 InvenTree/manage.py makemigrations stock
|
||||||
python3 InvenTree/manage.py makemigrations build
|
python3 InvenTree/manage.py makemigrations build
|
||||||
python3 InvenTree/manage.py makemigrations order
|
python3 InvenTree/manage.py makemigrations order
|
||||||
python3 InvenTree/manage.py migrate
|
python3 InvenTree/manage.py makemigrations
|
||||||
python3 InvenTree/manage.py migrate --run-syncdb
|
cd InvenTree && python3 manage.py migrate
|
||||||
|
cd InvenTree && python3 manage.py migrate --run-syncdb
|
||||||
python3 InvenTree/manage.py check
|
python3 InvenTree/manage.py check
|
||||||
python3 InvenTree/manage.py collectstatic
|
cd InvenTree && python3 manage.py collectstatic
|
||||||
|
|
||||||
# Install all required packages
|
# Install all required packages
|
||||||
install:
|
install:
|
||||||
|
@ -15,3 +15,4 @@ flake8==3.3.0 # PEP checking
|
|||||||
coverage>=4.5.3 # Unit test coverage
|
coverage>=4.5.3 # Unit test coverage
|
||||||
python-coveralls==2.9.1 # Coveralls linking (for Travis)
|
python-coveralls==2.9.1 # Coveralls linking (for Travis)
|
||||||
fuzzywuzzy>=0.17.0 # Fuzzy string matching
|
fuzzywuzzy>=0.17.0 # Fuzzy string matching
|
||||||
|
python-Levenshtein>=0.12.0 # Required for fuzzywuzzy
|
Loading…
x
Reference in New Issue
Block a user