Skip to content

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

Remove stock app

Marcin Gębalacc58f3298815
diff --git a/saleor/dashboard/product/views.py b/saleor/dashboard/product/views.py
index b42c2ff242..4e06b2f21b 100644
--- a/saleor/dashboard/product/views.py
+++ b/saleor/dashboard/product/views.py
@@ -19,8 +19,7 @@ class ProductListView(StaffMemberOnlyMixin, ListView, FormMixin):
def get_queryset(self):
qs = super(ProductListView, self).get_queryset()
- qs = qs.prefetch_related(
- 'stockrecords', 'images').select_related('brand')
+ qs = qs.prefetch_related('images').select_related('brand')
qs = qs.select_subclasses()
return qs
diff --git a/saleor/stock/__init__.py b/saleor/stock/__init__.py
deleted file mode 100644
index 8b13789179..0000000000
--- a/saleor/stock/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/saleor/stock/models.py b/saleor/stock/models.py
deleted file mode 100644
index 9cc6438ea3..0000000000
--- a/saleor/stock/models.py
+++ /dev/null
@@ -1,33 +0,0 @@
-from __future__ import unicode_literals
-
-from django.conf import settings
-from django.db import models
-from django.utils.translation import pgettext_lazy
-from django.utils.encoding import python_2_unicode_compatible
-from django_prices.models import PriceField
-
-from ..product.models import Product
-
-
-@python_2_unicode_compatible
-class Partner(models.Model):
- name = models.CharField(max_length=50)
-
- def __str__(self):
- return self.name
-
-
-@python_2_unicode_compatible
-class StockRecord(models.Model):
- partner = models.ForeignKey(Partner, null=True)
- sku = models.CharField(
- pgettext_lazy('Product field', 'sku'), max_length=32, unique=True)
- in_stock = models.PositiveIntegerField()
- price = PriceField(pgettext_lazy('Product field', 'price'),
- max_digits=12, decimal_places=4,
- currency=settings.DEFAULT_CURRENCY)
- allow_overselling = models.BooleanField(default=False)
- product = models.ForeignKey(Product, related_name='stockrecords')
-
- def __str__(self):
- return self.sku