Skip to content

Commit 8d06ee3

Browse files
mihir-kandoimergify[bot]
authored andcommitted
fix: job cards should not be deleted on close of WO
(cherry picked from commit c919b1d)
1 parent 6b4101d commit 8d06ee3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

erpnext/manufacturing/doctype/work_order/work_order.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ def on_cancel(self):
517517
self.db_set("status", "Cancelled")
518518

519519
self.on_close_or_cancel()
520+
self.delete_job_card()
520521

521522
def on_close_or_cancel(self):
522523
if self.production_plan and frappe.db.exists(
@@ -526,7 +527,6 @@ def on_close_or_cancel(self):
526527
else:
527528
self.update_work_order_qty_in_so()
528529

529-
self.delete_job_card()
530530
self.update_completed_qty_in_material_request()
531531
self.update_planned_qty()
532532
self.update_ordered_qty()

0 commit comments

Comments
 (0)