# pylint: disable=W0401,W0614, E0102
from oscar.apps.order import admin as oscar
from oscar.apps.order.admin import *  # noqa
from oscar.core.loading import get_model

Order = get_model("order", "Order")
Carrier = get_model("order", "Carrier")
Tracking = get_model("order", "Tracking")


class OrderAdmin(oscar.OrderAdmin):
    readonly_fields = oscar.OrderAdmin.readonly_fields + ("basket",)


admin.site.unregister(Order)
admin.site.register(Order, OrderAdmin)
admin.site.register(Carrier)
admin.site.register(Tracking)
