Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove unused field(costPrice) form ProductVariant
fowczrek500d89cfb1f8
diff --git a/saleor/graphql/product/tests/benchmark/test_variant.py b/saleor/graphql/product/tests/benchmark/test_variant.pyindex 5f42bd7603..440775a986 100644--- a/saleor/graphql/product/tests/benchmark/test_variant.py+++ b/saleor/graphql/product/tests/benchmark/test_variant.py@@ -222,10 +222,6 @@ def test_product_variant_create(}}}- costPrice {- currency- amount- }weight {valueunitdiff --git a/saleor/graphql/product/tests/test_variant.py b/saleor/graphql/product/tests/test_variant.pyindex f62a9645b9..5761f6eeb6 100644--- a/saleor/graphql/product/tests/test_variant.py+++ b/saleor/graphql/product/tests/test_variant.py@@ -63,10 +63,6 @@ def test_fetch_variant(slug}}- costPrice {- currency- amount- }media {id}@@ -367,10 +363,6 @@ CREATE_VARIANT_MUTATION = """}}}- costPrice {- currency- amount- }weight {valueunit@@ -1400,10 +1392,6 @@ def test_update_product_variant(slug}}- costPrice {- currency- amount- }}}}diff --git a/saleor/graphql/product/types/products.py b/saleor/graphql/product/types/products.pyindex 302696685b..df6cfd5d27 100644--- a/saleor/graphql/product/types/products.py+++ b/saleor/graphql/product/types/products.py@@ -39,7 +39,7 @@ from ...core.fields import (FilterInputConnectionField,PrefetchingConnectionField,)-from ...core.types import Image, Money, TaxedMoney, TaxedMoneyRange, TaxType+from ...core.types import Image, TaxedMoney, TaxedMoneyRange, TaxTypefrom ...core.utils import from_global_id_or_errorfrom ...decorators import (one_of_permissions_required,@@ -192,7 +192,6 @@ class ProductVariant(ChannelContextTypeWithMetadata, CountableDjangoObjectType):description="Define scope of returned attributes.",),)- cost_price = graphene.Field(Money, description="Cost price of the variant.")margin = graphene.Int(description="Gross margin percentage value.")quantity_ordered = graphene.Int(description="Total quantity ordered.")revenue = graphene.Field(diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex c049f530e4..ddccf6081d 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -4548,7 +4548,6 @@ type ProductVariant implements Node & ObjectWithMetadata {channelListings: [ProductVariantChannelListing!]pricing(address: AddressInput): VariantPricingInfoattributes(variantSelection: VariantAttributeScope): [SelectedAttribute!]!- costPrice: Moneymargin: IntquantityOrdered: Intrevenue(period: ReportingPeriod): TaxedMoney