title: django-mptt: How to auto select children in admin when selecting parent?
body: <p>I have some troubles when selecting parent - children are not auto selected. For example when I select <code>Cluster #2</code> its children (<code>Store #1</code> and <code>Store #2</code>) are not being selected:</p>
  <p><a href="https://i.stack.imgur.com/6I1DS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6I1DS.png" alt="enter image description here" /></a></p>
  <p>How can I fix that?</p>
  <p>It's important because I need to create many-to-many (Deviation-Orgunit) links only with <code>stores</code> (with leafs).</p>
  <p>Models:</p>
  <pre><code>from django.db import models
  from mptt.fields import TreeForeignKey
  from mptt.models import MPTTModel
  
  
  class Orgunit(MPTTModel):
      name = models.CharField(
          max_length=100
      )
      type = models.CharField(
          choices=[
              ('MACRO', 'Макро'),
              ('CLUSTER', 'Кластер'),
              ('KUST', 'Куст'),
              ('STORE', 'Магазин')
          ],
          max_length=100
      )
      parent = TreeForeignKey(
          'self',
          on_delete=models.CASCADE,
          null=True,
          blank=True,
          related_name='children'
      )
  
      def __str__(self):
          return self.name
  
  
  class Deviation(models.Model):
      name = models.CharField(max_length=100)
      number = models.PositiveIntegerField(null=True)
      orgunits = models.ManyToManyField('orgunits.Orgunit')
  
      def __str__(self):
          return self.name
  </code></pre>
  <p>Admin:</p>
  <pre><code>from django.contrib import admin
  
  from deviations.forms import MyForm
  from deviations.models import Deviation
  
  
  @admin.register(Deviation)
  class DeviationAdmin(admin.ModelAdmin):
      form = MyForm
  </code></pre>
  <p>Form:</p>
  <pre><code>from django.forms import ModelForm, widgets
  from mptt.forms import TreeNodeMultipleChoiceField
  
  from orgunits.models import Orgunit
  
  
  class MyForm(ModelForm):
      orgunits = TreeNodeMultipleChoiceField(queryset=Orgunit.objects.all(), widget=widgets.SelectMultiple())
  
      class Meta:
          model = Orgunit
          fields = '__all__'
  </code></pre>