[fix] set required quantity if item in bom found (#12460)

This commit is contained in:
Manas Solanki 2018-01-12 16:28:30 +05:30 committed by Nabin Hait
parent 7b78f6bee6
commit b19fd57043

View File

@ -462,7 +462,8 @@ class ProductionOrder(Document):
if reset_only_qty:
for d in self.get("required_items"):
d.required_qty = item_dict.get(d.item_code).get("qty")
if item_dict.get(d.item_code):
d.required_qty = item_dict.get(d.item_code).get("qty")
else:
for item in sorted(item_dict.values(), key=lambda d: d['idx']):
self.append('required_items', {