forked from erp-dev/erp
feat: human_id for all objects in business module
This commit is contained in:
@@ -528,6 +528,53 @@ class PrintingJobBatchAdvanceRecordAdmin(admin.ModelAdmin):
|
||||
return obj.printing_jobs.count()
|
||||
|
||||
|
||||
@admin.register(models.PrintingOrderExternalSnapshotSyncAudit)
|
||||
class PrintingOrderExternalSnapshotSyncAuditAdmin(admin.ModelAdmin):
|
||||
list_display = (
|
||||
'id',
|
||||
'external_order_id',
|
||||
'printing_order',
|
||||
'operator_user',
|
||||
'operator_employee',
|
||||
'allow_reset_stateflow',
|
||||
'is_success',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
)
|
||||
list_filter = (
|
||||
'is_success',
|
||||
'allow_reset_stateflow',
|
||||
'created_at',
|
||||
)
|
||||
search_fields = (
|
||||
'external_order_id',
|
||||
'printing_order__id',
|
||||
'operator_user__username',
|
||||
'operator_employee__name',
|
||||
'failure_reason',
|
||||
)
|
||||
readonly_fields = (
|
||||
'printing_order',
|
||||
'external_order_id',
|
||||
'operator_user',
|
||||
'operator_employee',
|
||||
'before_snapshot',
|
||||
'allow_reset_stateflow',
|
||||
'is_success',
|
||||
'failure_reason',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
)
|
||||
date_hierarchy = 'created_at'
|
||||
ordering = ('-created_at', '-id')
|
||||
|
||||
def has_add_permission(self, request):
|
||||
return False
|
||||
|
||||
def has_change_permission(self, request, obj=None):
|
||||
return False
|
||||
|
||||
|
||||
@admin.register(models.PlateOrderTiiaUploadFailure)
|
||||
class PlateOrderTiiaUploadFailureAdmin(admin.ModelAdmin):
|
||||
list_display = ('id', 'run_date', 'plate_order_id', 'attempts', 'last_attempt_at', 'created_at')
|
||||
|
||||
Reference in New Issue
Block a user