removed has_key, used pythonic in (#13236)

* removed has_key, used pythonic in

* Update bom.py
This commit is contained in:
Achilles Rasquinha
2018-03-09 12:35:47 +05:30
committed by Rushabh Mehta
parent f2d28ebd6a
commit b4de7e3d07
5 changed files with 7 additions and 7 deletions

View File

@@ -43,7 +43,7 @@ def get_stock_value_on(warehouse=None, posting_date=None, item_code=None):
sle_map = {}
for sle in stock_ledger_entries:
if not sle_map.has_key((sle.item_code, sle.warehouse)):
if not (sle.item_code, sle.warehouse) in sle_map:
sle_map[(sle.item_code, sle.warehouse)] = flt(sle.stock_value)
return sum(sle_map.values())