[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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user