fix(ProdPlan): Get SubAssy Items does not work (#27537)

* fix(ProdPlan): Get SubAssy Items does not work

This button wasn't working unless the document was saved already.

* fix: make form dirty when subassy item are fetched

(cherry picked from commit 78fe92542c)

# Conflicts:
#	erpnext/manufacturing/doctype/production_plan/production_plan.py
This commit is contained in:
Ankush Menat
2021-09-16 15:34:50 +05:30
committed by Mergify
parent f5160dc83d
commit 65f2e8b7c8

View File

@@ -701,10 +701,13 @@ class ProductionPlan(Document):
get_sub_assembly_items(row.bom_no, bom_data, row.planned_qty)
self.set_sub_assembly_items_based_on_level(row, bom_data, manufacturing_type)
<<<<<<< HEAD
self.sub_assembly_items.sort(key=lambda d: d.bom_level, reverse=True)
for idx, row in enumerate(self.sub_assembly_items, start=1):
row.idx = idx
=======
>>>>>>> 78fe92542c (fix(ProdPlan): Get SubAssy Items does not work (#27537))
def set_sub_assembly_items_based_on_level(self, row, bom_data, manufacturing_type=None):
for data in bom_data:
data.qty = data.stock_qty