and couldn't find anything else on how to transform it into a marketplace like amazon etc.
- Seller should only see his orders in dashboard and allowed to select fulfilment partner(himself) or us(marketplace).
- Multiple sellers for the same product needs to be configured
- Payment settlement to Seller @16th and 30th day - Settlement through Oscar Dashboard
With regards to point 1 as described in the link :
I did the following for a partner to see only his orders in dashboard. I need help to figure whether this is correct.
dashboard/views.py
def get_order_lines(self,user):
partner_code= Partner.objects.get(AbstractPartner.code)
partners = Partner._default_manager.filter(users=user)
partner = Partner._default_manager.filter(users=user,partner_code=partner_code)
# Get all products displayed in order lines by all partners accessed by staff
if user.is_staff:
return self.object.lines.all()
# Get all products displayed in order lines by all partners accessed by a partner in dashboard
if user.are_partners:
return self.object(lines__partner__in=partners).lines.distinct()
# Get partner product only displayed in order lines accessed by a partner in dashboard
elif user.is_partner:
return self.object(lines__partner__in=partner).lines.distinct()
i defined two fields is_partner and are_partners in customers/models.py specially for the above get_order_lines modification.
With regards to point 2 and 3 , are there any documentation on how to do it ?
Thanks in advance !