Remove required fields for order
This commit is contained in:
parent
23ab6974fe
commit
47df760c5f
@ -190,21 +190,21 @@ class Order(models.Model):
|
|||||||
related_name="+",
|
related_name="+",
|
||||||
editable=False,
|
editable=False,
|
||||||
null=True,
|
null=True,
|
||||||
on_delete=models.SET_NULL,
|
on_delete=models.SET_NULL
|
||||||
)
|
)
|
||||||
shipping_address = models.ForeignKey(
|
shipping_address = models.ForeignKey(
|
||||||
Address,
|
Address,
|
||||||
related_name="+",
|
related_name="+",
|
||||||
editable=False,
|
editable=False,
|
||||||
null=True,
|
null=True,
|
||||||
on_delete=models.SET_NULL,
|
on_delete=models.SET_NULL
|
||||||
)
|
)
|
||||||
shipping_method = models.ForeignKey(
|
shipping_method = models.ForeignKey(
|
||||||
ShippingMethod,
|
ShippingMethod,
|
||||||
blank=True,
|
blank=True,
|
||||||
null=True,
|
null=True,
|
||||||
related_name="orders",
|
related_name="orders",
|
||||||
on_delete=models.SET_NULL,
|
on_delete=models.SET_NULL
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -212,6 +212,7 @@ class Order(models.Model):
|
|||||||
Coupon,
|
Coupon,
|
||||||
related_name='orders',
|
related_name='orders',
|
||||||
on_delete=models.SET_NULL,
|
on_delete=models.SET_NULL,
|
||||||
|
blank=True,
|
||||||
null=True
|
null=True
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -224,7 +225,7 @@ class Order(models.Model):
|
|||||||
total_net_amount = models.DecimalField(
|
total_net_amount = models.DecimalField(
|
||||||
max_digits=10,
|
max_digits=10,
|
||||||
decimal_places=2,
|
decimal_places=2,
|
||||||
default=0,
|
default=0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -232,6 +233,8 @@ class Order(models.Model):
|
|||||||
measurement=Weight,
|
measurement=Weight,
|
||||||
unit_choices=WeightUnits.CHOICES,
|
unit_choices=WeightUnits.CHOICES,
|
||||||
default=zero_weight,
|
default=zero_weight,
|
||||||
|
blank=True,
|
||||||
|
null=True
|
||||||
)
|
)
|
||||||
|
|
||||||
created_at = models.DateTimeField(auto_now_add=True, editable=False)
|
created_at = models.DateTimeField(auto_now_add=True, editable=False)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user