commit | 6f1fd193ebd60289491f0297f1f138777997217b | [log] [tgz] |
---|---|---|
author | Alchez <Alchez@users.noreply.github.com> | Tue Nov 13 11:47:23 2018 +0530 |
committer | Nabin Hait <nabinhait@gmail.com> | Tue Nov 13 11:47:23 2018 +0530 |
tree | d139a6aa627ff7ca1a64072cab3e9062ecf56ed3 | |
parent | 849169e82b6eedabff746c1fb23bf652d224160d [diff] |
fix(production_plan): Allow work orders to be cancelled (#15955)
diff --git a/erpnext/manufacturing/doctype/production_plan/production_plan.py b/erpnext/manufacturing/doctype/production_plan/production_plan.py index d6b62b3..7d11ae4 100644 --- a/erpnext/manufacturing/doctype/production_plan/production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/production_plan.py
@@ -210,9 +210,10 @@ def set_status(self): self.status = { - '0': 'Draft', - '1': 'Submitted' - }[cstr(self.docstatus or 0)] + 0: 'Draft', + 1: 'Submitted', + 2: 'Cancelled' + }.get(self.docstatus) if self.total_produced_qty > 0: self.status = "In Process"