[FIX] Remove deprecated gen_object.next() function (#15418)

BOM tree view was getting impacted due to use of a deprecated function.
This fix replaces deprecated object.next() function with next(gen_object).
This commit is contained in:
Govind S Menokee 2018-09-18 10:42:21 +05:30 committed by Nabin Hait
parent db8c1f254e
commit d38160c816

View File

@ -661,8 +661,8 @@ def get_children(doctype, parent=None, is_root=False, **filters):
# extend bom_item dict with respective item dict # extend bom_item dict with respective item dict
bom_item.update( bom_item.update(
# returns an item dict from items list which matches with item_code # returns an item dict from items list which matches with item_code
(item for item in items if item.get('name') next(item for item in items if item.get('name')
== bom_item.get('item_code')).next() == bom_item.get('item_code'))
) )
bom_item.expandable = 0 if bom_item.value in ('', None) else 1 bom_item.expandable = 0 if bom_item.value in ('', None) else 1