add new field to party mode
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from core.apps.orders.models import Party, PartyAmount
|
||||
from core.apps.orders.models import Party, PartyAmount, DeletedParty
|
||||
|
||||
|
||||
class PartyAmountInline(admin.StackedInline):
|
||||
@@ -11,7 +11,7 @@ class PartyAmountInline(admin.StackedInline):
|
||||
|
||||
@admin.register(Party)
|
||||
class PartyAdmin(admin.ModelAdmin):
|
||||
list_display = ['mediator', 'delivery_date', 'payment_date']
|
||||
list_display = ['mediator', 'delivery_date', 'payment_date', 'is_deleted']
|
||||
inlines = [PartyAmountInline]
|
||||
|
||||
|
||||
@@ -20,4 +20,8 @@ class PartyAmountAdmin(admin.ModelAdmin):
|
||||
list_display = ['id', 'total_price', 'cost_amount']
|
||||
|
||||
def has_module_permission(self, request):
|
||||
return False
|
||||
return False
|
||||
|
||||
@admin.register(DeletedParty)
|
||||
class DeletedPartyAdmin(admin.ModelAdmin):
|
||||
list_display = ['id', 'deleted_date', 'party']
|
||||
Reference in New Issue
Block a user