Browse Source

[minor] add rename to client

version-14
Pratik Vyas 11 years ago
parent
commit
59e2bef91b
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      webnotes/client.py

+ 6
- 1
webnotes/client.py 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)}

Loading…
Cancel
Save