From 5336d0929621043d87e6c7a51c3f2e1882c6d088 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 6 Mar 2022 23:34:01 +0100 Subject: [PATCH] fix api values --- InvenTree/order/serializers.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/InvenTree/order/serializers.py b/InvenTree/order/serializers.py index 7398d37055..100836889b 100644 --- a/InvenTree/order/serializers.py +++ b/InvenTree/order/serializers.py @@ -515,6 +515,11 @@ class SalesOrderSerializer(ReferenceIndexingSerializerMixin, InvenTreeModelSeria reference = serializers.CharField(required=True) + total_price = InvenTreeMoneySerializer( + source='get_total_price', + allow_null=True + ) + total_price_string = serializers.CharField(source='get_total_price', read_only=True) class Meta: @@ -537,6 +542,7 @@ class SalesOrderSerializer(ReferenceIndexingSerializerMixin, InvenTreeModelSeria 'status_text', 'shipment_date', 'target_date', + 'total_price', 'total_price_string', ]