[Fix] After amend the status become cancelled even if docstatus is zero

This commit is contained in:
Rohit Waghchaure
2017-01-13 12:51:19 +05:30
parent b8350353ea
commit 29458836e4
3 changed files with 14 additions and 0 deletions

View File

@@ -103,6 +103,8 @@ class StatusUpdater(Document):
def set_status(self, update=False, status=None, update_modified=True):
if self.is_new():
if self.get('amended_from'):
self.status = 'Draft'
return
if self.doctype in status_map: