2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 11:10:54 +00:00

Update requirements (#3228)

* Remove stat context variables

* Revert "Remove stat context variables"

This reverts commit 0989c308d0.

* remove old backport

* move requirements

* move isort

* move migrations-tests

* add pip-tools as req and add hook

* Use hashes and also run when txt files are added

* Update to hashes in requirements

* update requirements install path

* remove allauth-2fa for a test

* install dev-requirements

* re-enable allauth

* remove hashes from pre normal setup

* Remove version bindings if they are the laest

* move depencies to upper bound

* fix django-money

* remove windows specific requirements

* also install dependencies

* update markdownify

* remove django-admin-shell

* remove unneeded packages

* add docs

* remove pins and fix pre-commit pipeline

* pin django-money

* really remove admin shell

* return default behaviour for money serializer

* pip fix

* update filter name

* set decimal for output

* add migrations

* pin coveralls

* update requirements

Co-authored-by: Oliver Walters <oliver.henry.walters@gmail.com>
This commit is contained in:
Matthias Mair
2022-06-28 14:12:00 +02:00
committed by GitHub
parent 1a90d06acc
commit cf70e4220f
23 changed files with 652 additions and 87 deletions

View File

@ -283,7 +283,7 @@ class StockLocationList(ListCreateAPI):
filters.OrderingFilter,
]
filter_fields = [
filterset_fields = [
]
search_fields = [
@ -1064,7 +1064,7 @@ class StockAttachmentList(AttachmentMixin, ListCreateDestroyAPIView):
filters.SearchFilter,
]
filter_fields = [
filterset_fields = [
'stock_item',
]
@ -1095,7 +1095,7 @@ class StockItemTestResultList(ListCreateDestroyAPIView):
filters.OrderingFilter,
]
filter_fields = [
filterset_fields = [
'test',
'user',
'result',
@ -1302,7 +1302,7 @@ class StockTrackingList(ListAPI):
filters.OrderingFilter,
]
filter_fields = [
filterset_fields = [
'item',
'user',
]

View File

@ -183,7 +183,11 @@ class StockItemSerializer(InvenTree.serializers.InvenTreeModelSerializer):
def get_purchase_price_string(self, obj):
"""Return purchase price as string."""
return str(obj.purchase_price) if obj.purchase_price else '-'
if obj.purchase_price:
obj.purchase_price.decimal_places_display = 4
return str(obj.purchase_price)
return '-'
purchase_order_reference = serializers.CharField(source='purchase_order.reference', read_only=True)
sales_order_reference = serializers.CharField(source='sales_order.reference', read_only=True)