Skip to content

Commit 7c2bbe0

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 0a2234a commit 7c2bbe0

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
@@ -770,6 +770,7 @@ def on_cancel(self):
770770
self.db_set("status", "Cancelled")
771771

772772
self.on_close_or_cancel()
773+
self.delete_job_card()
773774

774775
def on_close_or_cancel(self):
775776
if self.production_plan and frappe.db.exists(
@@ -779,7 +780,6 @@ def on_close_or_cancel(self):
779780
else:
780781
self.update_work_order_qty_in_so()
781782

782-
self.delete_job_card()
783783
self.update_completed_qty_in_material_request()
784784
self.update_planned_qty()
785785
self.update_ordered_qty()

0 commit comments

Comments
 (0)