|
|
@@ -27,7 +27,8 @@ class DocType: |
|
|
|
webnotes.conn.set(self.doc,'module',doctype_module and doctype_module[0][0] or 'NULL') |
|
|
|
|
|
|
|
def validate(self): |
|
|
|
sql("select name from `tabSearch Criteria` where criteria_name=%s and name!=%s", (self.doc.criteria_name, self.doc.name)) |
|
|
|
if sql("select name from `tabSearch Criteria` where criteria_name=%s and name!=%s", (self.doc.criteria_name, self.doc.name)): |
|
|
|
webnots.msgprint("Criteria Name '%s' already used, please use another name" % self.doc.criteria_name, raise_exception = 1) |
|
|
|
|
|
|
|
def on_update(self): |
|
|
|
self.set_module() |
|
|
|