latest 2 days work excluding problemetic code
This commit is contained in:
@@ -5,12 +5,6 @@ from django.contrib import admin
|
||||
from django.utils.html import format_html
|
||||
from django.contrib import messages
|
||||
from unfold.admin import ModelAdmin
|
||||
from unfold.contrib.filters.admin import (
|
||||
RelatedDropdownFilter,
|
||||
ChoicesDropdownFilter,
|
||||
DropdownFilter,
|
||||
RangeDateFilter,
|
||||
)
|
||||
from simple_history.admin import SimpleHistoryAdmin
|
||||
from igny8_core.admin.base import AccountAdminMixin, Igny8ModelAdmin
|
||||
from igny8_core.business.billing.models import (
|
||||
@@ -41,11 +35,7 @@ class CreditTransactionResource(resources.ModelResource):
|
||||
class CreditTransactionAdmin(ExportMixin, AccountAdminMixin, Igny8ModelAdmin):
|
||||
resource_class = CreditTransactionResource
|
||||
list_display = ['id', 'account', 'transaction_type', 'amount', 'balance_after', 'description', 'created_at']
|
||||
list_filter = [
|
||||
('transaction_type', ChoicesDropdownFilter),
|
||||
('created_at', RangeDateFilter),
|
||||
('account', RelatedDropdownFilter),
|
||||
]
|
||||
list_filter = ['transaction_type', 'created_at', 'account']
|
||||
search_fields = ['description', 'account__name']
|
||||
readonly_fields = ['created_at']
|
||||
date_hierarchy = 'created_at'
|
||||
@@ -197,13 +187,7 @@ class PaymentAdmin(ExportMixin, AccountAdminMixin, SimpleHistoryAdmin, Igny8Mode
|
||||
'approved_by',
|
||||
'processed_at',
|
||||
]
|
||||
list_filter = [
|
||||
('status', ChoicesDropdownFilter),
|
||||
('payment_method', ChoicesDropdownFilter),
|
||||
('currency', ChoicesDropdownFilter),
|
||||
('created_at', RangeDateFilter),
|
||||
('processed_at', RangeDateFilter),
|
||||
]
|
||||
list_filter = ['status', 'payment_method', 'currency', 'created_at', 'processed_at']
|
||||
search_fields = [
|
||||
'invoice__invoice_number',
|
||||
'account__name',
|
||||
@@ -668,12 +652,7 @@ class PlanLimitUsageAdmin(ExportMixin, AccountAdminMixin, Igny8ModelAdmin):
|
||||
'period_display',
|
||||
'created_at',
|
||||
]
|
||||
list_filter = [
|
||||
('limit_type', ChoicesDropdownFilter),
|
||||
('period_start', RangeDateFilter),
|
||||
('period_end', RangeDateFilter),
|
||||
('account', RelatedDropdownFilter),
|
||||
]
|
||||
list_filter = ['limit_type', 'period_start', 'period_end', 'account']
|
||||
search_fields = ['account__name']
|
||||
readonly_fields = ['created_at', 'updated_at']
|
||||
date_hierarchy = 'period_start'
|
||||
|
||||
Reference in New Issue
Block a user