[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-16 20:54:59 +01:00
parent 3d05ddab50
commit 50cdacba90
1 changed files with 1 additions and 1 deletions

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)