Prevent to compare with None on searching quantity
issue11047 review387481002
This commit is contained in:
@@ -157,7 +157,8 @@ class StockMixin(object):
|
||||
}.get(operator_, lambda v, l: False)
|
||||
record_ids = []
|
||||
for key, quantity in pbl.items():
|
||||
if operator_(quantity, operand):
|
||||
if (quantity is not None and operand is not None
|
||||
and operator_(quantity, operand)):
|
||||
# pbl could return None in some keys
|
||||
if key[position] is not None:
|
||||
record_ids.append(key[position])
|
||||
|
||||
Reference in New Issue
Block a user