From 605132a31c14b624399cbe1f021ca2355abb0020 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:34:25 +0530 Subject: [PATCH] fix: incorrect work order status (backport #40407) (#40411) fix: incorrect work order status (#40407) (cherry picked from commit 948297692e8c7467b90883983731b4794b81e81a) Co-authored-by: rohitwaghchaure --- erpnext/manufacturing/doctype/work_order/work_order.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/erpnext/manufacturing/doctype/work_order/work_order.py b/erpnext/manufacturing/doctype/work_order/work_order.py index e018ee35fc7..e5746c2fd78 100644 --- a/erpnext/manufacturing/doctype/work_order/work_order.py +++ b/erpnext/manufacturing/doctype/work_order/work_order.py @@ -330,6 +330,13 @@ class WorkOrder(Document): else: status = "Cancelled" + if ( + self.skip_transfer + and self.produced_qty + and self.qty > (flt(self.produced_qty) + flt(self.process_loss_qty)) + ): + status = "In Process" + return status def update_work_order_qty(self):