From 346c83247503752a3d8edbfca678abfd8dc34458 Mon Sep 17 00:00:00 2001
From: Rushabh Mehta
Date: Mon, 3 Dec 2012 14:15:53 +0530
Subject: [PATCH] remove rename_tool
---
home/page/latest_updates/latest_updates.js | 4 +
setup/page/setup/setup.html | 4 +-
utilities/doctype/rename_tool/__init__.py | 1 -
utilities/doctype/rename_tool/rename_tool.js | 21 ------
utilities/doctype/rename_tool/rename_tool.py | 31 --------
utilities/doctype/rename_tool/rename_tool.txt | 73 -------------------
6 files changed, 6 insertions(+), 128 deletions(-)
delete mode 100755 utilities/doctype/rename_tool/__init__.py
delete mode 100644 utilities/doctype/rename_tool/rename_tool.js
delete mode 100644 utilities/doctype/rename_tool/rename_tool.py
delete mode 100755 utilities/doctype/rename_tool/rename_tool.txt
diff --git a/home/page/latest_updates/latest_updates.js b/home/page/latest_updates/latest_updates.js
index 24cab01fdf..eccacbdb73 100644
--- a/home/page/latest_updates/latest_updates.js
+++ b/home/page/latest_updates/latest_updates.js
@@ -1,4 +1,8 @@
erpnext.updates = [
+ ["3rd December 2012", [
+ "Rename Tool: Documents that can be renamed will have a 'Rename' option in the sidebar (wherever applicable).",
+ "Chart of Accounts: Ability to rename / delete from Chart of Accouns.",
+ ]],
["30th November 2012", [
"Auto Notifications: System will prompt user with pre-set message for auto-notification.",
"Employee: Users with role Employee will only be able to see their Employee Records.",
diff --git a/setup/page/setup/setup.html b/setup/page/setup/setup.html
index 1eca285065..1b5e967230 100644
--- a/setup/page/setup/setup.html
+++ b/setup/page/setup/setup.html
@@ -46,8 +46,8 @@
Un-trash items
- Rename Master
- Rename a single master record
+ Rename Master
+ Click on "Rename" on the sidebar of an item for renaming.
diff --git a/utilities/doctype/rename_tool/__init__.py b/utilities/doctype/rename_tool/__init__.py
deleted file mode 100755
index baffc48825..0000000000
--- a/utilities/doctype/rename_tool/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from __future__ import unicode_literals
diff --git a/utilities/doctype/rename_tool/rename_tool.js b/utilities/doctype/rename_tool/rename_tool.js
deleted file mode 100644
index fe024c672d..0000000000
--- a/utilities/doctype/rename_tool/rename_tool.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-// over-ride the link query to return relevant link names
-
-cur_frm.fields_dict.document_to_rename.get_query = function(doc, dt, dn) {
- return "SELECT name FROM `tab"+doc.select_doctype+"` WHERE docstatus<2 AND name LIKE '%s' LIMIT 50";
-}
\ No newline at end of file
diff --git a/utilities/doctype/rename_tool/rename_tool.py b/utilities/doctype/rename_tool/rename_tool.py
deleted file mode 100644
index 79832fb87e..0000000000
--- a/utilities/doctype/rename_tool/rename_tool.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-from __future__ import unicode_literals
-class DocType:
- def __init__(self, d, dl=[]):
- self.doc, self.doclist = d, dl
-
- def rename(self):
- """
- Generate update quereies for rename
- """
- import webnotes.model
-
- # rename the document
- webnotes.model.rename(self.doc.select_doctype, self.doc.document_to_rename, self.doc.new_name)
-
- webnotes.msgprint("Successfully renamed "+self.doc.select_doctype+" : '"+self.doc.document_to_rename+"' to "+self.doc.new_name+"")
diff --git a/utilities/doctype/rename_tool/rename_tool.txt b/utilities/doctype/rename_tool/rename_tool.txt
deleted file mode 100755
index 1645616942..0000000000
--- a/utilities/doctype/rename_tool/rename_tool.txt
+++ /dev/null
@@ -1,73 +0,0 @@
-[
- {
- "owner": "Administrator",
- "docstatus": 0,
- "creation": "2012-11-30 18:14:18",
- "modified_by": "Administrator",
- "modified": "2012-12-03 09:48:37"
- },
- {
- "allow_email": 1,
- "hide_heading": 0,
- "issingle": 1,
- "name": "__common__",
- "allow_print": 1,
- "doctype": "DocType",
- "module": "Utilities",
- "hide_toolbar": 0
- },
- {
- "name": "__common__",
- "parent": "Rename Tool",
- "doctype": "DocField",
- "parenttype": "DocType",
- "permlevel": 0,
- "parentfield": "fields"
- },
- {
- "parent": "Rename Tool",
- "read": 1,
- "name": "__common__",
- "create": 1,
- "doctype": "DocPerm",
- "write": 1,
- "parenttype": "DocType",
- "role": "System Manager",
- "permlevel": 0,
- "parentfield": "permissions"
- },
- {
- "name": "Rename Tool",
- "doctype": "DocType"
- },
- {
- "doctype": "DocField",
- "label": "Select DocType",
- "fieldname": "select_doctype",
- "fieldtype": "Select",
- "options": "\nAccount\nCompany\nCustomer\nSupplier\nEmployee\nWarehouse\nItem\nProfile\nSerial No"
- },
- {
- "doctype": "DocField",
- "label": "Document to rename",
- "fieldname": "document_to_rename",
- "fieldtype": "Link",
- "options": "[Select]"
- },
- {
- "doctype": "DocField",
- "label": "New Name",
- "fieldname": "new_name",
- "fieldtype": "Data"
- },
- {
- "doctype": "DocField",
- "label": "Rename",
- "fieldname": "rename",
- "fieldtype": "Button",
- "options": "rename"
- },
- {
- "doctype": "DocPerm"
- }
-]
\ No newline at end of file