Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Set stock location in OrderItem as charfield
Mira Szewczykd22dc027ce0f
diff --git a/saleor/order/models.py b/saleor/order/models.pyindex a484691c14..334f4ca61f 100644--- a/saleor/order/models.py+++ b/saleor/order/models.py@@ -252,7 +252,7 @@ class DeliveryGroup(models.Model, ItemSet):product_sku=product_variant.sku,unit_price_gross=price.gross,stock=stock,- stock_location=stock.location if stock else None)+ stock_location=stock.location.location if stock else None)if stock:# allocate quantity to avoid oversellingStock.objects.allocate_stock(stock, quantity)