add price cuaclate for admin pannel
This commit is contained in:
@@ -172,8 +172,8 @@ class ProductModelAdmin(ModelAdmin, ImportExportModelAdmin):
|
||||
}
|
||||
|
||||
def display_price(self, obj):
|
||||
return 1000
|
||||
return obj.get_toman_price()
|
||||
if obj.variants.all().first():
|
||||
return obj.variants.all().first().get_toman_price()
|
||||
display_price.short_description = 'قیمت تومانی'
|
||||
|
||||
@display(description='محصول', header=True)
|
||||
|
||||
Reference in New Issue
Block a user