|
|
@@ -28,7 +28,7 @@ class DocType: |
|
|
|
|
|
|
|
def validate(self): |
|
|
|
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) |
|
|
|
webnotes.msgprint("Criteria Name '%s' already used, please use another name" % self.doc.criteria_name, raise_exception = 1) |
|
|
|
|
|
|
|
def on_update(self): |
|
|
|
self.set_module() |
|
|
@@ -72,4 +72,4 @@ class DocType: |
|
|
|
if os.path.exists(os.path.join(path, old_name + extn)): |
|
|
|
os.system('cp %s %s' % (os.path.join(path, old_name + extn), \ |
|
|
|
os.path.join(get_module_path(self.doc.module), 'search_criteria', scrub(self.doc.name), scrub(self.doc.name) + extn))) |
|
|
|
|
|
|
|
|