fix: item list and project not being set in work order when created from material request

(cherry picked from commit 099a5fbad9)
This commit is contained in:
Mihir Kandoi
2025-07-07 13:01:41 +05:30
committed by Mergify
parent 8eede1d266
commit 5cd36c318b

View File

@@ -764,10 +764,11 @@ def raise_work_orders(material_request):
"material_request_item": d.name, "material_request_item": d.name,
"planned_start_date": mr.transaction_date, "planned_start_date": mr.transaction_date,
"company": mr.company, "company": mr.company,
"project": d.project,
} }
) )
wo_order.set_work_order_operations() wo_order.get_items_and_operations_from_bom()
wo_order.flags.ignore_validate = True wo_order.flags.ignore_validate = True
wo_order.flags.ignore_mandatory = True wo_order.flags.ignore_mandatory = True
wo_order.save() wo_order.save()