[bean] [mandatory] fixes in test cases

This commit is contained in:
Anand Doshi
2013-07-08 18:50:45 +05:30
parent 2862c9e1df
commit 4ee647e84c
20 changed files with 75 additions and 33 deletions

View File

@@ -228,6 +228,10 @@ class DocType:
cc.update({"doctype": "Cost Center"})
cc_bean = webnotes.bean(cc)
cc_bean.ignore_permissions = True
if cc.get("cost_center_name") == self.doc.name:
cc_bean.ignore_mandatory = True
cc_bean.insert()
webnotes.conn.set(self.doc, "cost_center", "Main - " + self.doc.abbr)