Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add shipping method field in delivery group
Artur Smętec661d944efb
diff --git a/saleor/order/migrations/0006_deliverygroup_shipping_method.py b/saleor/order/migrations/0006_deliverygroup_shipping_method.pynew file mode 100644index 0000000000..0dc1107622--- /dev/null+++ b/saleor/order/migrations/0006_deliverygroup_shipping_method.py@@ -0,0 +1,19 @@+# -*- coding: utf-8 -*-+from __future__ import unicode_literals++from django.db import migrations, models+++class Migration(migrations.Migration):++ dependencies = [+ ('order', '0005_deliverygroup_last_updated'),+ ]++ operations = [+ migrations.AddField(+ model_name='deliverygroup',+ name='shipping_method',+ field=models.CharField(default='', max_length=255, db_index=True),+ ),+ ]diff --git a/saleor/order/models.py b/saleor/order/models.pyindex 47c7acd27c..db4400ced4 100644--- a/saleor/order/models.py+++ b/saleor/order/models.py@@ -183,6 +183,8 @@ class DeliveryGroup(models.Model, ItemSet):decimal_places=4,default=0,editable=False)+ shipping_method = models.CharField(max_length=255, default='',+ db_index=True)last_updated = models.DateTimeField(null=True, auto_now=True)objects = DeliveryGroupManager()