Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix for updating status of order after fulfillment
Maciej Korycinskif8d22c859213
diff --git a/saleor/dashboard/order/views.py b/saleor/dashboard/order/views.pyindex ffbfeefbf0..c1c0bfcede 100644--- a/saleor/dashboard/order/views.py+++ b/saleor/dashboard/order/views.py@@ -637,6 +637,7 @@ def fulfill_order_lines(request, order_pk):number="quantity_fulfilled",) % {"quantity_fulfilled": quantity_fulfilled}+ fulfillment.refresh_from_db()order_fulfilled(fulfillment,request.user,diff --git a/tests/dashboard/test_order.py b/tests/dashboard/test_order.pyindex 91506c7406..f6b1f17f37 100644--- a/tests/dashboard/test_order.py+++ b/tests/dashboard/test_order.py@@ -1129,6 +1129,7 @@ def test_view_fulfill_order_lines(for line in order_with_lines.lines.all():assert line.quantity_unfulfilled == 0assert mock_email_fulfillment.call_count == 1+ assert order_with_lines.status == OrderStatus.FULFILLEDdef test_view_fulfill_order_lines_with_empty_quantity(admin_client, order_with_lines):