Manage multiple dealers in django oscar

144 views
Skip to first unread message

Yogesh Dwivedi

unread,
Mar 16, 2016, 6:37:27 AM3/16/16
to django-oscar

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.

malioni91

unread,
May 14, 2018, 4:07:26 AM5/14/18
to django-oscar
Hi, 

I have the same question. Can anyone help please?

Thanks in advance, 
Malion

Jiechao Li

unread,
Feb 11, 2019, 1:42:09 AM2/11/19
to django-oscar
Does anyone solve this problem yet? Many thanks
Reply all
Reply to author
Forward
0 new messages