Source

gnocchi-catalogue / catalogue / admin.py

Full commit
from django.contrib import admin
from gnocchi_catalogue import models
from gnocchi_tools.admin import InlineAttributeAdmin

class InlinePriceBreakAdmin( admin.TabularInline ):
    model = models.PriceBreak

class InlineVariantAdmin( admin.TabularInline ):
    model = models.ProductVariant

class InlineProductImageAdmin( admin.TabularInline ):
    model = models.ProductImage

class ProductAdmin( admin.ModelAdmin ):
    list_display = ( 'title', 'price', 'short_description', 'get_codes', )
    list_filter = ( 'price', )
    filter_horizontal = ( 'related_products', )
    inlines = [
        InlineVariantAdmin,
        InlineProductImageAdmin,
        InlinePriceBreakAdmin,
        InlineAttributeAdmin,
    ]
    def get_codes(self, obj):
        return u', '.join(obj.productvariant_set.values_list('sku', flat=True ))
    get_codes.short_description = 'Codes'


admin.site.register( models.Product, ProductAdmin )