mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
hide delete button
This commit is contained in:
parent
d068b0a064
commit
44239cba08
@ -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):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user