[FIX] stock : traceback filter 'Available Products'

It happens because the function still use the old fields
utilized before refactoring introduced by commit b3180c8411

This commit adapt the function by using quantity instead of qty.
This commit is contained in:
amoyaux
2017-08-11 09:43:07 +02:00
parent 48b2ce60ed
commit c089d39a66
+2 -2
View File
@@ -267,9 +267,9 @@ class Product(models.Model):
domain_quant.append(('owner_id', '=', owner_id))
if package_id:
domain_quant.append(('package_id', '=', package_id))
quants_groupby = self.env['stock.quant'].read_group(domain_quant, ['product_id', 'qty'], ['product_id'])
quants_groupby = self.env['stock.quant'].read_group(domain_quant, ['product_id', 'quantity'], ['product_id'])
for quant in quants_groupby:
if OPERATORS[operator](quant['qty'], value):
if OPERATORS[operator](quant['quantity'], value):
product_ids.add(quant['product_id'][0])
return list(product_ids)