if bom is cancelled, mark it as inactive and uncheck default. also unset it in item

This commit is contained in:
Anand Doshi 2012-11-27 18:33:39 +05:30
parent 8e8f5f0878
commit ab6848d37b

View File

@ -398,3 +398,7 @@ class DocType:
if par:
msgprint("BOM can not be cancelled, as it is a child item in following active BOM %s"% [d[0] for d in par])
raise Exception
webnotes.conn.set(self.doc, "is_active", "No")
webnotes.conn.set(self.doc, "is_default", 0)
self.manage_default_bom()