Removing an order

45 views
Skip to first unread message

Mateusz Kalinowski

unread,
Sep 7, 2022, 2:45:55 AM9/7/22
to django-oscar
Hello,

Is it possible to remove an Order ? 

I can't see suitable option in the dashboard. I was also looking in the code and couldn't find functionality for it.

Sorry if I am missing something simple.

Thanks! 

Solorak Sweet

unread,
Sep 7, 2022, 4:00:53 AM9/7/22
to django-oscar
Hello ! From the dashboard , I have not seen any option to do that ( you can customize it to add it ) . Moreover you could use shell to delete the order . ( I recommend shell plus because it imports every model and you do not have to do it manually  https://pypi.org/project/django-shell-plus/ ). Furthermore  in shell do type : 
1) from order.models import Invoice, Order
2) Order.objects.get(number = "order number").delete()

923...@gmail.com

unread,
Sep 7, 2022, 4:08:34 AM9/7/22
to django-oscar
In cases like this I recommend to set and use standart django admin panel(just add 'from django.contrib import admin' and url(r'url-you-want-bea-available/', admin.site.urls),) in your main urls.py. It's usefull for moments like this. 

среда, 7 сентября 2022 г. в 10:00:53 UTC+2, solor...@gmail.com:

Mateusz Kalinowski

unread,
Sep 16, 2022, 9:12:34 PM9/16/22
to django-oscar
Thank you for advices! I have added custom option in the dashboard and it works great
Reply all
Reply to author
Forward
0 new messages