Procházet zdrojové kódy

[minor] add rename to client

version-14
Pratik Vyas před 11 roky
rodič
revize
59e2bef91b
1 změnil soubory, kde provedl 6 přidání a 1 odebrání
  1. +6
    -1
      webnotes/client.py

+ 6
- 1
webnotes/client.py Zobrazit soubor

@@ -61,6 +61,11 @@ def save(doclist):
return [d.fields for d in 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() @webnotes.whitelist()
def submit(doclist): def submit(doclist):
if isinstance(doclist, basestring): if isinstance(doclist, basestring):
@@ -118,4 +123,4 @@ def bulk_update(docs):
@webnotes.whitelist() @webnotes.whitelist()
def has_permission(doctype, docname, perm_type="read"): def has_permission(doctype, docname, perm_type="read"):
# perm_type can be one of read, write, create, submit, cancel, report # 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)}

Načítá se…
Zrušit
Uložit