tree_ids_subquery = Genre.objects \
.filter(product__name=u'Product',
product__vendor__name=u'Vendor') \
.values_list('tree_id', flat=True) \
.distinct()
genres = Genre.objects.filter(tree_id__in=tree_ids_subquery)
class MPTTMeta:
order_insertion_by = ['name']