From 7b8723445ee695e88590bb833f60a0c4731106fa Mon Sep 17 00:00:00 2001 From: Anoop Kurungadam Date: Mon, 14 Mar 2022 19:34:18 +0530 Subject: [PATCH] fix: job card - sub operations table status misbehaviour on pause / resume Job Card --- erpnext/manufacturing/doctype/job_card/job_card.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/job_card/job_card.py b/erpnext/manufacturing/doctype/job_card/job_card.py index 3c406156ebd..fae09b320a4 100644 --- a/erpnext/manufacturing/doctype/job_card/job_card.py +++ b/erpnext/manufacturing/doctype/job_card/job_card.py @@ -48,7 +48,7 @@ class JobCard(Document): self.validate_work_order() def set_sub_operations(self): - if self.operation: + if not self.sub_operations and self.operation: self.sub_operations = [] for row in frappe.get_all('Sub Operation', filters = {'parent': self.operation}, fields=['operation', 'idx'], order_by='idx'):