hide delete button

This commit is contained in:
Matthias 2022-03-30 01:30:32 +02:00
parent d068b0a064
commit 44239cba08
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -40,6 +40,11 @@ class CompanyAdmin(ImportExportModelAdmin):
exclude = ('is_deleted',)
def has_delete_permission(self, request, obj=None):
if obj and obj.is_deleted:
return False
return True
class SupplierPartResource(ModelResource):
"""