From c0bf435d2cab9e319267dfec516596e21b36215f Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 24 Dec 2012 11:25:11 +0530 Subject: [PATCH] validate permissions before delete --- projects/doctype/task/task.py | 3 --- projects/doctype/task/task.txt | 45 ++++++++++++---------------------- 2 files changed, 15 insertions(+), 33 deletions(-) diff --git a/projects/doctype/task/task.py b/projects/doctype/task/task.py index c390806f5a..83f899586a 100644 --- a/projects/doctype/task/task.py +++ b/projects/doctype/task/task.py @@ -24,8 +24,6 @@ from webnotes import msgprint sql = webnotes.conn.sql - - class DocType: def __init__(self,doc,doclist=[]): self.doc = doc @@ -37,7 +35,6 @@ class DocType: ret = {'customer': cust and cust[0][0] or '', 'customer_name': cust and cust[0][1] or ''} return ret - # TODO: Remove these? as the field customer doesn't exists def get_customer_details(self): cust = sql("select customer_name from `tabCustomer` where name=%s", self.doc.customer) if cust: diff --git a/projects/doctype/task/task.txt b/projects/doctype/task/task.txt index a7ada4b3d7..f47d2eb9d5 100644 --- a/projects/doctype/task/task.txt +++ b/projects/doctype/task/task.txt @@ -2,27 +2,18 @@ { "owner": "Administrator", "docstatus": 0, - "creation": "2012-09-18 11:05:48", + "creation": "2012-10-29 14:30:00", "modified_by": "Administrator", - "modified": "2012-10-29 14:24:55" + "modified": "2012-12-24 10:46:06" }, { - "section_style": "Tray", - "allow_attach": 1, - "tag_fields": "status", - "module": "Projects", - "server_code_error": " ", - "allow_trash": 1, - "doctype": "DocType", - "document_type": "Master", - "subject": "%(subject)s", "autoname": "TASK.#####", - "name": "__common__", - "colour": "White:FFF", - "_last_update": "1324880734", - "show_in_menu": 0, + "allow_attach": 1, + "doctype": "DocType", + "module": "Projects", "max_attachments": 5, - "version": 1 + "document_type": "Master", + "name": "__common__" }, { "name": "__common__", @@ -74,13 +65,13 @@ "reqd": 0 }, { - "search_index": 1, + "oldfieldtype": "Date", "doctype": "DocField", "label": "Expected End Date", "oldfieldname": "exp_end_date", "fieldname": "exp_end_date", "fieldtype": "Date", - "oldfieldtype": "Date", + "search_index": 1, "reqd": 0, "in_filter": 1 }, @@ -93,11 +84,9 @@ }, { "oldfieldtype": "Link", - "colour": "White:FFF", "doctype": "DocField", "label": "Project", "oldfieldname": "project", - "trigger": "Client", "fieldname": "project", "fieldtype": "Link", "options": "Project" @@ -105,23 +94,21 @@ { "no_copy": 1, "oldfieldtype": "Select", - "colour": "White:FFF", "doctype": "DocField", "label": "Status", "oldfieldname": "status", - "trigger": "Client", "fieldname": "status", "fieldtype": "Select", "options": "Open\nWorking\nPending Review\nClosed\nCancelled" }, { - "search_index": 1, + "oldfieldtype": "Select", "doctype": "DocField", "label": "Priority", "oldfieldname": "priority", "fieldname": "priority", "fieldtype": "Select", - "oldfieldtype": "Select", + "search_index": 1, "reqd": 0, "options": "Low\nMedium\nHigh\nUrgent", "in_filter": 1 @@ -217,13 +204,12 @@ }, { "doctype": "DocField", + "label": "More Details", "fieldname": "more_details", - "fieldtype": "Section Break", - "label": "More Details" + "fieldtype": "Section Break" }, { "oldfieldtype": "Date", - "colour": "White:FFF", "doctype": "DocField", "label": "Review Date", "oldfieldname": "review_date", @@ -234,7 +220,6 @@ }, { "oldfieldtype": "Date", - "colour": "White:FFF", "doctype": "DocField", "label": "Closing Date", "oldfieldname": "closing_date", @@ -260,7 +245,7 @@ "permlevel": 0 }, { - "permlevel": 1, - "doctype": "DocPerm" + "doctype": "DocPerm", + "permlevel": 1 } ] \ No newline at end of file