title: Django queryset (filter) based on user logged and foreign key other model
body: <p>Here is my models.py:</p>
  
  <pre><code>class Product(models.Model):
       name = models.CharField(max_length=200, db_index=True)
       created_by = models.ForeignKey(get_user_model(), on_delete=models.CASCADE)
       created = models.DateTimeField(auto_now_add=True)
  
  class Order(models.Model):
       name = models.CharField(max_length=30)
       created_by = models.ForeignKey(get_user_model(), on_delete=models.CASCADE)
       created = models.DateTimeField(auto_now_add=True)
       updated = models.DateTimeField(auto_now=True)
  
  class OrderItem(models.Model):
       order = models.ForeignKey(Order, related_name='items', on_delete=models.CASCADE)
       product = models.ForeignKey(Product, related_name='order_items', on_delete=models.CASCADE)
       schedule = models.CharField(max_length=7)
  </code></pre>
  
  <p>views.py:</p>
  
  <pre><code>def order_list(request):
       orders = OrderItem.objects.filter(id__product=id, product_id=Product.objects.filter(created_by=request.user))
       return render(request, 'orders/order/order_list.html', {'orders': orders})
  </code></pre>
  
  <p>Template:</p>
  
  <pre><code>{% block content %}
  &lt;div class="container"&gt;
      &lt;h4 class="text-center logo my-4"&gt;
          &lt;a&gt;Queue List&lt;/a&gt;
      &lt;/h4&gt;
      &lt;div&gt;
          &lt;table class="table"&gt;
          &lt;thead class="thead-inverse"&gt;
              &lt;tr&gt;
                  &lt;th&gt;Name&lt;/th&gt;
                  &lt;th&gt;Gender&lt;/th&gt;
                  &lt;th&gt;Birth Date&lt;/th&gt;
                  &lt;th&gt;Age&lt;/th&gt;
                  &lt;th&gt;Action&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
              {% for order in orders %}
              &lt;tr&gt;
                  &lt;td&gt;{{ order.order.name }}&lt;/td&gt;
                  &lt;td&gt;{{ order.order.gender }}&lt;/td&gt;
                  &lt;td&gt;{{ order.order.birth_date }}&lt;/td&gt;
                  &lt;td&gt;{{ order.order.age }}&lt;/td&gt;
                  &lt;td&gt;&lt;a href="" class="btn btn-primary mb-3" role="button"&gt;Add&lt;/a&gt;&lt;/td&gt;
              &lt;/tr&gt;
              {% endfor %}
          &lt;/tbody&gt;
          &lt;/table&gt;
      &lt;/div&gt;  
  &lt;/div&gt;
  {% endblock %}
  </code></pre>
  
  <p>I'm new to Django. I'd like to create view based on user who created the product. So when that user logs in to the web they can see the order item list.</p>
  
  <p>Here is the error message: </p>
  
  <blockquote>
    <p>Unsupported lookup 'product' for AutoField or join on the field not
    permitted.</p>
  </blockquote>