def change_view(self, request, object_id, extra_context=None):

    def formfield_for_foreignkey(self, db_field, request, **kwargs):
        if db_field.name == 'book':
            kwargs['queryset'] = Book.objects.filter(author__id=object_id)
return super(ItemInline, self).formfield_for_foreignkey(db_field, request,
    **kwargs)
ItemInline.formfield_for_foreignkey = formfield_for_foreignkey
self.inline_instances = [ItemInline(self.model, self.admin_site)]
return super(AuthorAdmin, self).change_view(request, object_id,
    extra_context=extra_context)
Фильтровать внешний ключ в Inlineform