Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Update docs

Marcin Gębala1d415f574bd9
diff --git a/docs/orders.rst b/docs/orders.rst
index fd904e4a63..813f072d0a 100644
--- a/docs/orders.rst
+++ b/docs/orders.rst
@@ -1,18 +1,34 @@
Order management
================
+Orders are created after customers successfully complete the checkout process. The `Order` object itself contains only general information about the customer's order.
+
Delivery Group
--------------
-Delivery group represent parts of an order consisting of multiple order lines. They are created along with order by splitting cart into parts depending whether product has shipping required or not.
+The delivery group represents a group of ordered items. By default, groups are created along with an order by splitting the cart into parts, depending whether a product requires shipping or not.
+
+Most of the order management actions are taken on the delivery groups and include changing their statuses.
+
+There are three possible delivery group statuses:
+
+- ``NEW``
+ The default status of newly created delivery groups.
+
+- ``SHIPPED``
+ The delivery group has been marked as shipped.
+
+- ``CANCELLED``
+ The delivery group has been cancelled.
+
-Statuses
+Order statuses
--------
-Order status is deduced based on related delivery group statuses, which in turn can be ``NEW``, ``SHIPPED`` or ``CANCELLED``. For display there are used two values:
+Order status is deduced based on statuses of its delivery groups. There are two possible statuses:
- ``OPEN``
- There is at least one delivery group in order having ``NEW`` status.
+ There is at least one delivery group with the ``NEW`` status. An an action by a shop operator is required to continue order processing.
- ``CLOSED``
- There is no delivery group in order having ``NEW`` status.
+ There are no delivery groups with the ``NEW`` status. Order doesn't require further actions by a shop operator.
diff --git a/saleor/order/models.py b/saleor/order/models.py
index c81e310711..f249838b0b 100644
--- a/saleor/order/models.py
+++ b/saleor/order/models.py
@@ -26,11 +26,11 @@ class OrderQuerySet(models.QuerySet):
"""Filters orders by status deduced from shipment groups."""
def open(self):
- """Orders having at least one NEW status in shipment groups."""
+ """Orders having at least one shipment group with status NEW."""
return self.filter(Q(groups__status=GroupStatus.NEW))
def closed(self):
- """Orders having any NEW status in shipment groups."""
+ """Orders having no shipment groups with status NEW."""
return self.filter(~Q(groups__status=GroupStatus.NEW))