Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add comment in order.create_history_entry in summary.py::create_order
michal4f9ddafe6f10
diff --git a/saleor/checkout/views/summary.py b/saleor/checkout/views/summary.pyindex ea274aded2..3ef7dac3de 100644--- a/saleor/checkout/views/summary.py+++ b/saleor/checkout/views/summary.py@@ -1,13 +1,14 @@from django.contrib import messagesfrom django.shortcuts import redirectfrom django.template.response import TemplateResponse-from django.utils.translation import pgettext+from django.utils.translation import pgettext, pgettext_lazyfrom ..forms import (AnonymousUserBillingForm, BillingAddressesForm,BillingWithoutShippingAddressForm)from ...userprofile.forms import get_address_formfrom ...userprofile.models import Address+from ...order import OrderStatusdef create_order(checkout):@@ -20,7 +21,8 @@ def create_order(checkout):return None, redirect('checkout:summary')checkout.clear_storage()checkout.cart.clear()- order.create_history_entry()+ order.create_history_entry(status=OrderStatus.NEW, comment=pgettext_lazy(+ 'Order status change', 'Order was placed'))order.send_confirmation_email()return order, redirect('order:payment', token=order.token)