fix(production_plan): Allow work orders to be cancelled (#15955)

This commit is contained in:
Alchez 2018-11-13 11:47:23 +05:30 committed by Nabin Hait
parent 849169e82b
commit 6f1fd193eb

View File

@ -210,9 +210,10 @@ class ProductionPlan(Document):
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"