Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix google_merchant logic. Add fixme with info that get_price doesnt return taxed price
Maciej Korycinskia83c34c46f31
diff --git a/saleor/data_feeds/google_merchant.py b/saleor/data_feeds/google_merchant.pyindex 2a65dfa58c..87422fa8ee 100644--- a/saleor/data_feeds/google_merchant.py+++ b/saleor/data_feeds/google_merchant.py@@ -8,6 +8,7 @@ from django.contrib.syndication.views import add_domainfrom django.core.files.storage import default_storagefrom django.utils.encoding import smart_text+from ..core.taxes import ZERO_MONEYfrom ..discount.models import Salefrom ..product.models import Attribute, AttributeValue, Category, ProductVariant@@ -124,8 +125,9 @@ def item_tax(item, discounts):Read more:https://support.google.com/merchants/answer/6324454"""- price = item.get_price(discounts=discounts)- return "US::%s:y" % price.tax+ # FIXME get_price never returns taxed price+ # price = item.get_price(discounts=discounts)+ return "US::%s:y" % ZERO_MONEYdef item_group_id(item):@@ -165,12 +167,12 @@ def item_google_product_category(item, category_paths):def item_price(item):price = item.get_price(discounts=None)- return "%s %s" % (price.gross.amount, price.currency)+ return "%s %s" % (price.amount, price.currency)def item_sale_price(item, discounts):sale_price = item.get_price(discounts=discounts)- return "%s %s" % (sale_price.gross.amount, sale_price.currency)+ return "%s %s" % (sale_price.amount, sale_price.currency)def item_attributes(