Merge branch 'release/3.0.14'
This commit is contained in:
commit
3199f02ea7
@ -490,12 +490,12 @@ class OrderLine(models.Model):
|
||||
return self.quantity - self.quantity_fulfilled
|
||||
|
||||
def minus_stock(self):
|
||||
if self.variant.track_inventory:
|
||||
if self.variant and self.variant.track_inventory:
|
||||
self.variant.stock -= self.quantity
|
||||
self.variant.save()
|
||||
|
||||
def add_stock(self):
|
||||
if self.variant.track_inventory:
|
||||
if self.variant and self.variant.track_inventory:
|
||||
self.variant.stock += self.quantity
|
||||
self.variant.save()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user