add view and add permissions for ProductImagesAdmin and ProductDetailModel1Admin
This commit is contained in:
@@ -147,6 +147,12 @@ class ProductImagesAdmin(ModelAdmin):
|
||||
}
|
||||
}
|
||||
|
||||
def has_view_permission(self, request, obj=None):
|
||||
return True
|
||||
|
||||
def has_add_permission(self, request, obj=None):
|
||||
return True
|
||||
|
||||
@display(description='محصول', header=True)
|
||||
def display_image(self, instance):
|
||||
if instance and instance.image:
|
||||
@@ -220,6 +226,11 @@ class ProductDetailModel1Admin(ModelAdmin, ImportExportModelAdmin):
|
||||
}
|
||||
}
|
||||
|
||||
def has_view_permission(self, request, obj=None):
|
||||
return True
|
||||
|
||||
def has_add_permission(self, request, obj=None):
|
||||
return True
|
||||
|
||||
|
||||
class ProductVariantInLine(ProductVariantInlineAdminPermission, StackedInline):
|
||||
|
||||
Reference in New Issue
Block a user