I try to combine AND and OR in a filter using Q objects. It looks like that the | behave like an AND. This is related to the previous annotate which is run in the same query and
This answer is late but could be helpful to a lot of guys out there.
[...].filter(hide=False & deleted=False) .filter(Q(stock=False) | Q(quantity__gte=1))
This will generate something similar to
WHERE (hide=0 AND deleted=0 AND (T1.qty > 0 OR stock=0))