Rename Tool updates
This commit is contained in:
@@ -12,9 +12,9 @@ class DocType:
|
||||
# call on_rename method if exists
|
||||
obj = get_obj(self.doc.select_doctype, self.doc.document_to_rename)
|
||||
if hasattr(obj, 'on_rename'):
|
||||
obj.on_rename(self.doc.new_name)
|
||||
|
||||
# rename the document
|
||||
obj.on_rename(self.doc.new_name,self.doc.document_to_rename)
|
||||
|
||||
# rename the document
|
||||
webnotes.model.rename(self.doc.select_doctype, self.doc.document_to_rename, self.doc.new_name)
|
||||
|
||||
webnotes.msgprint("Item renamed successfully")
|
||||
webnotes.msgprint("Successfully renamed "+self.doc.select_doctype+" : '"+self.doc.document_to_rename+"' to <b>"+self.doc.new_name+"</b>")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[
|
||||
{
|
||||
'_last_update': '1308739509',
|
||||
'_last_update': '1309348691',
|
||||
'allow_attach': None,
|
||||
'allow_copy': None,
|
||||
'allow_email': 1,
|
||||
@@ -13,7 +13,7 @@
|
||||
'client_script_core': None,
|
||||
'client_string': None,
|
||||
'colour': 'White:FFF',
|
||||
'creation': '2011-06-23 11:03:25',
|
||||
'creation': '2011-06-22 18:42:33',
|
||||
'description': None,
|
||||
'docstatus': 0,
|
||||
'doctype': 'DocType',
|
||||
@@ -29,7 +29,7 @@
|
||||
'istable': None,
|
||||
'max_attachments': None,
|
||||
'menu_index': None,
|
||||
'modified': '2011-06-23 11:03:25',
|
||||
'modified': '2011-06-30 19:21:07',
|
||||
'modified_by': 'Administrator',
|
||||
'module': 'Tools',
|
||||
'name': 'Rename Tool',
|
||||
@@ -53,21 +53,21 @@
|
||||
'subject': None,
|
||||
'tag_fields': None,
|
||||
'use_template': None,
|
||||
'version': 6
|
||||
'version': 7
|
||||
},
|
||||
{
|
||||
'amend': None,
|
||||
'cancel': None,
|
||||
'create': 1,
|
||||
'creation': '2011-06-23 11:03:25',
|
||||
'creation': '2011-06-22 18:42:33',
|
||||
'docstatus': 0,
|
||||
'doctype': 'DocPerm',
|
||||
'execute': None,
|
||||
'idx': 1,
|
||||
'match': None,
|
||||
'modified': '2011-06-23 11:03:25',
|
||||
'modified': '2011-06-30 19:21:07',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'PERM00859',
|
||||
'name': 'PERM00833',
|
||||
'owner': 'Administrator',
|
||||
'parent': 'Rename Tool',
|
||||
'parentfield': 'permissions',
|
||||
@@ -80,8 +80,8 @@
|
||||
},
|
||||
{
|
||||
'allow_on_submit': None,
|
||||
'colour': None,
|
||||
'creation': '2011-06-23 11:03:25',
|
||||
'colour': 'White:FFF',
|
||||
'creation': '2011-06-22 18:42:33',
|
||||
'default': None,
|
||||
'depends_on': None,
|
||||
'description': None,
|
||||
@@ -94,14 +94,14 @@
|
||||
'idx': 1,
|
||||
'in_filter': None,
|
||||
'label': 'Select DocType',
|
||||
'modified': '2011-06-23 11:03:25',
|
||||
'modified': '2011-06-30 19:21:07',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL05599',
|
||||
'name': 'FL05557',
|
||||
'no_column': None,
|
||||
'no_copy': None,
|
||||
'oldfieldname': None,
|
||||
'oldfieldtype': None,
|
||||
'options': 'link:DocType',
|
||||
'options': '\nAccount\nCompany\nCustomer\nSupplier\nEmployee\nWarehouse\nItem',
|
||||
'owner': 'Administrator',
|
||||
'parent': 'Rename Tool',
|
||||
'parentfield': 'fields',
|
||||
@@ -117,7 +117,7 @@
|
||||
{
|
||||
'allow_on_submit': None,
|
||||
'colour': None,
|
||||
'creation': '2011-06-23 11:03:25',
|
||||
'creation': '2011-06-22 18:42:33',
|
||||
'default': None,
|
||||
'depends_on': None,
|
||||
'description': None,
|
||||
@@ -130,9 +130,9 @@
|
||||
'idx': 2,
|
||||
'in_filter': None,
|
||||
'label': 'Document to rename',
|
||||
'modified': '2011-06-23 11:03:25',
|
||||
'modified': '2011-06-30 19:21:07',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL05600',
|
||||
'name': 'FL05558',
|
||||
'no_column': None,
|
||||
'no_copy': None,
|
||||
'oldfieldname': None,
|
||||
@@ -153,7 +153,7 @@
|
||||
{
|
||||
'allow_on_submit': None,
|
||||
'colour': None,
|
||||
'creation': '2011-06-23 11:03:25',
|
||||
'creation': '2011-06-22 18:42:33',
|
||||
'default': None,
|
||||
'depends_on': None,
|
||||
'description': None,
|
||||
@@ -166,9 +166,9 @@
|
||||
'idx': 3,
|
||||
'in_filter': None,
|
||||
'label': 'New Name',
|
||||
'modified': '2011-06-23 11:03:25',
|
||||
'modified': '2011-06-30 19:21:07',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL05601',
|
||||
'name': 'FL05559',
|
||||
'no_column': None,
|
||||
'no_copy': None,
|
||||
'oldfieldname': None,
|
||||
@@ -189,7 +189,7 @@
|
||||
{
|
||||
'allow_on_submit': None,
|
||||
'colour': None,
|
||||
'creation': '2011-06-23 11:03:25',
|
||||
'creation': '2011-06-22 18:42:33',
|
||||
'default': None,
|
||||
'depends_on': None,
|
||||
'description': None,
|
||||
@@ -202,9 +202,9 @@
|
||||
'idx': 4,
|
||||
'in_filter': None,
|
||||
'label': 'Rename',
|
||||
'modified': '2011-06-23 11:03:25',
|
||||
'modified': '2011-06-30 19:21:07',
|
||||
'modified_by': 'Administrator',
|
||||
'name': 'FL05602',
|
||||
'name': 'FL05560',
|
||||
'no_column': None,
|
||||
'no_copy': None,
|
||||
'oldfieldname': None,
|
||||
|
||||
Reference in New Issue
Block a user