Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Rename 'shipping_date' field in fulfillment model to 'created'
Krzysztof Świątek0d2aa92db231
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex c2197985e2..7d31ddcb70 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -11,9 +11,8 @@ All notable, unreleased changes to this project will be documented in this file.- Query object translation with only manage_translation permission - #4914 by @fowczarek- Add customer note to draft orders api - #4973 by @IKarbowiak- Allow to delete category and leave products - #4970 by @IKarbowiak-- Add cutomer note to draft orders api - #4973 by @IKarbowiak- Remove thumbnail generation from migration - #3494 by @kswiatek92-+- Rename 'shipping_date' field in fulfillment model to 'created' - #2433 by @kswiatek92## 2.9.0diff --git a/saleor/graphql/order/types.py b/saleor/graphql/order/types.pyindex 89deca4d41..febc60c9b3 100644--- a/saleor/graphql/order/types.py+++ b/saleor/graphql/order/types.py@@ -175,7 +175,7 @@ class Fulfillment(MetadataObjectType, CountableDjangoObjectType):only_fields = ["fulfillment_order","id",- "shipping_date",+ "created","status","tracking_number",]diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex 770cc50756..f7314d0922 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -1600,7 +1600,7 @@ type Fulfillment implements Node {fulfillmentOrder: Int!status: FulfillmentStatus!trackingNumber: String!- shippingDate: DateTime!+ created: DateTime!privateMeta: [MetaStore]!meta: [MetaStore]!lines: [FulfillmentLine]diff --git a/saleor/order/migrations/0077_auto_20191118_0606.py b/saleor/order/migrations/0077_auto_20191118_0606.pynew file mode 100644index 0000000000..65c15ec4de--- /dev/null+++ b/saleor/order/migrations/0077_auto_20191118_0606.py@@ -0,0 +1,19 @@+# Generated by Django 2.2.6 on 2019-11-18 12:06++from django.db import migrations, models+++class Migration(migrations.Migration):++ dependencies = [("order", "0076_auto_20191018_0554")]++ operations = [+ migrations.RenameField(+ model_name="fulfillment", old_name="shipping_date", new_name="created"+ ),+ migrations.AlterField(+ model_name="fulfillment",+ name="created",+ field=models.DateTimeField(auto_now_add=True),+ ),+ ]diff --git a/saleor/order/models.py b/saleor/order/models.pyindex bc7b4b042b..48f8ea69d9 100644--- a/saleor/order/models.py+++ b/saleor/order/models.py@@ -440,7 +440,7 @@ class Fulfillment(ModelWithMetadata):choices=FulfillmentStatus.CHOICES,)tracking_number = models.CharField(max_length=255, default="", blank=True)- shipping_date = models.DateTimeField(default=now, editable=False)+ created = models.DateTimeField(auto_now_add=True)def __str__(self):return pgettext_lazy("Fulfillment str", "Fulfillment #%s") % (self.composed_id,)diff --git a/saleor/webhook/payloads.py b/saleor/webhook/payloads.pyindex 6a1df6f66f..0bb79118cd 100644--- a/saleor/webhook/payloads.py+++ b/saleor/webhook/payloads.py@@ -28,7 +28,7 @@ ADDRESS_FIELDS = (def generate_order_payload(order: "Order"):serializer = PayloadSerializer()- fulfillment_fields = ("status", "tracking_number", "shipping_date")+ fulfillment_fields = ("status", "tracking_number", "created")payment_fields = ("gateway""is_active"