title: Django - how can i filter a list of objects checking a foreign key attribute?
body: <p>First of all sorry for my bad English.</p>
  
  <p>I have to filter a query but using a foreign key attribute. I have a WorkOrder model and have other model with the order movements.</p>
  
  <p>this is the model</p>
  
  <pre><code>class OrderMovements(models.Model):
      workorder = models.ForeignKey(
              WorkOrder,
              verbose_name=_('order'),
          )
      status = models.IntegerField(
              choices=FULL_CHOICES,
              default=1,
              verbose_name=_('status'),
          )
      timestamp = models.DateTimeField(auto_now_add=True, auto_now=False)
  </code></pre>
  
  <p>Well like you see a work order can have a lot of movements, the queryset that i need to make is a query that take the last 10 WorkOrders that have a OrderMovement with status 3 or 4 included in any of the movements of that WorkOrder.</p>
  
  <p>I really don't know how can a make this.</p>
  
  <p>Hope you can understand me.</p>
  
  <p>Thanks!</p>