From bcf64716125b28b0b5adc8a42cc0c264583d195a Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 11 Aug 2011 14:02:08 +0530 Subject: [PATCH] fix to update_after_submit --- cgi-bin/webnotes/model/doclist.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cgi-bin/webnotes/model/doclist.py b/cgi-bin/webnotes/model/doclist.py index b6f687991d..cb70bc2df5 100644 --- a/cgi-bin/webnotes/model/doclist.py +++ b/cgi-bin/webnotes/model/doclist.py @@ -239,6 +239,8 @@ class DocList: """ Update after submit - some values changed after submit """ + if self.doc.docstatus != 1: + msgprint("Only to called after submit", raise_exception=1) self.to_docstatus = 1 self.prepare_for_save(1) self.save_main()