[minor] add rename to client

This commit is contained in:
Pratik Vyas 2013-12-17 16:11:23 +05:30
parent ea150e0ad2
commit 59e2bef91b

View file

@ -61,6 +61,11 @@ def save(doclist):
return [d.fields for d in doclist]
@webnotes.whitelist()
def rename_doc(doctype, old_name, new_name):
new_name = webnotes.rename_doc(doctype, old_name, new_name)
return new_name
@webnotes.whitelist()
def submit(doclist):
if isinstance(doclist, basestring):
@ -118,4 +123,4 @@ def bulk_update(docs):
@webnotes.whitelist()
def has_permission(doctype, docname, perm_type="read"):
# perm_type can be one of read, write, create, submit, cancel, report
return {"has_permission": webnotes.has_permission(doctype, perm_type.lower(), docname)}
return {"has_permission": webnotes.has_permission(doctype, perm_type.lower(), docname)}