Repository: django-oscar/django-oscar

Issue:
wrong loading of models in partner app
### Issue Summary

Here: https://github.com/django-oscar/django-oscar/blob/master/src/oscar/apps/partner/receivers.py#L6

Two models are loaded with `get_classes`, but should this not happen with `get_model`? Using the current approach, I cannot override the `StockRecord` model - using `get_model`, it works without problems? 

Error: RuntimeError: Conflicting 'stockrecord' models in application 'partner': <class 'apps.partner.models.StockRecord'> and <class 'partner.models.StockRecord'>.

Note that I have a running shop, and forked many of the oscar apps, this is the only one not working.

### Steps to Reproduce

Fork partner app, try to override the StockRecord.

### Technical details

This might be my fault...my understanding is, that get_model is for loading models, and get_classes for loading "normal" classes, right?


* Python version: 3.7
* Django version: 1.11
* Oscar version: 1.6 (same code is in 2.0)



Discussion:
my current workaround is to also override the receivers.py, and the ready method in config.py

Resolving patch:
diff --git a/src/oscar/apps/analytics/receivers.py b/src/oscar/apps/analytics/receivers.py
--- a/src/oscar/apps/analytics/receivers.py
+++ b/src/oscar/apps/analytics/receivers.py
@@ -8,11 +8,12 @@
 from oscar.apps.catalogue.signals import product_viewed
 from oscar.apps.order.signals import order_placed
 from oscar.apps.search.signals import user_search
-from oscar.core.loading import get_classes
+from oscar.core.loading import get_model
 
-UserSearch, UserRecord, ProductRecord, UserProductView = get_classes(
-    'analytics.models', ['UserSearch', 'UserRecord', 'ProductRecord',
-                         'UserProductView'])
+ProductRecord = get_model('analytics', 'ProductRecord')
+UserProductView = get_model('analytics', 'UserProductView')
+UserRecord = get_model('analytics', 'UserRecord')
+UserSearch = get_model('analytics', 'UserSearch')
 
 # Helpers
 
diff --git a/src/oscar/apps/partner/importers.py b/src/oscar/apps/partner/importers.py
--- a/src/oscar/apps/partner/importers.py
+++ b/src/oscar/apps/partner/importers.py
@@ -5,14 +5,17 @@
 from django.utils.translation import gettext_lazy as _
 
 from oscar.core.compat import UnicodeCSVReader
-from oscar.core.loading import get_class, get_classes
+from oscar.core.loading import get_class, get_model
 
 ImportingError = get_class('partner.exceptions', 'ImportingError')
-Partner, StockRecord = get_classes('partner.models', ['Partner',
-                                                      'StockRecord'])
-ProductClass, Product, Category, ProductCategory = get_classes(
-    'catalogue.models', ('ProductClass', 'Product', 'Category',
-                         'ProductCategory'))
+
+Category = get_model('catalogue', 'Category')
+Partner = get_model('partner', 'Partner')
+Product = get_model('catalogue', 'Product')
+ProductCategory = get_model('catalogue', 'ProductCategory')
+ProductClass = get_model('catalogue', 'ProductClass')
+StockRecord = get_model('partner', 'StockRecord')
+
 create_from_breadcrumbs = get_class('catalogue.categories', 'create_from_breadcrumbs')
 
 
diff --git a/src/oscar/apps/partner/receivers.py b/src/oscar/apps/partner/receivers.py
--- a/src/oscar/apps/partner/receivers.py
+++ b/src/oscar/apps/partner/receivers.py
@@ -1,10 +1,10 @@
 from django.db.models.signals import post_save
 from django.dispatch import receiver
 
-from oscar.core.loading import get_classes
+from oscar.core.loading import get_model
 
-StockRecord, StockAlert = get_classes('partner.models', ['StockRecord',
-                                                         'StockAlert'])
+StockAlert = get_model('partner', 'StockAlert')
+StockRecord = get_model('partner', 'StockRecord')
 
 
 @receiver(post_save, sender=StockRecord)


Test patch: