[FIX] stock: search qty available correction when searching zero quantities

When =, >=, <= 0 it cannot use the read_group of quants because the results will not be in the read_group Fixes #5701
This commit is contained in:
Josse Colpaert
2015-03-17 16:50:50 +01:00
parent 3d05ddab50
commit 50cdacba90
+1 -1
View File
@@ -185,7 +185,7 @@ class product_product(osv.osv):
operator = '=='
ids = []
if name == 'qty_available':
if name == 'qty_available' and (value != 0.0 or operator not in ('==', '>=', '<=')):
res.append(('id', 'in', self._search_qty_available(cr, uid, operator, value, context)))
else:
product_ids = self.search(cr, uid, [], context=context)