[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:
parent
db8c1f254e
commit
d38160c816
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user