I'm new django-oscar and my need to manage multiple seller that they can add their product and can view ie. they can have their own dashboard, I follow this url
https://django-oscar.readthedocs.org/en/releases-0.6/howto/multi_dealer_setup.html
and override oscar partner model like:-
from django.db import models
from oscar.apps.partner.abstract_models import AbstractPartner
from oscar.core.compat import AUTH_USER_MODEL
from django.utils.translation import ugettext_lazy as _
class Partner(AbstractPartner):
user = models.OneToOneField(
AUTH_USER_MODEL, related_name="partner",
blank=True, verbose_name=_("Users"))
from oscar.apps.partner.models import *
Now the above link has a line that I am not getting
"You’ll need to enforce creating of a StockRecord with every Product. When a Product is created, Stockrecord.partner gets set to self.request.user.partner (created if necessary), and hence the connection is made."
If anyone have any idea about my problem then please let me know, how can I achieve it.
Thanks in Advance :-)
when I migrate above model after that I try to create partner I am getting Integrity error. if any one have any idea about how to manage multiple account for dashboard then please let me know.