diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 6ea80cf273a..e15f33de6e9 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -919,7 +919,7 @@ class JobCard(Document): wo.calculate_operating_cost() wo.set_actual_dates() - if wo.track_semi_finished_goods and time_data: + if time_data: wo.status = "In Process" wo.save() diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index 282c9646973..f331ada8e49 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -572,9 +572,9 @@ class WorkOrder(Document): ): status = "In Process" - if self.track_semi_finished_goods and status != "Completed": - if op_status := self.get_status_based_on_operation(): - status = op_status + if status != "Completed": + if not all(d.status == "Pending" for d in self.operations): + status = "In Process" if status == "Not Started" and self.reserve_stock: for row in self.required_items: @@ -589,11 +589,6 @@ class WorkOrder(Document): return status - def get_status_based_on_operation(self): - for row in self.operations: - if row.status != "Completed": - return "In Process" - def update_work_order_qty(self): """Update **Manufactured Qty** and **Material Transferred for Qty** in Work Order based on Stock Entry"""