@@ -1,3 +0,0 @@ | |||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors | |||||
# MIT License. See license.txt | |||||
@@ -1,8 +0,0 @@ | |||||
// Copyright (c) 2016, Frappe Technologies and contributors | |||||
// For license information, please see license.txt | |||||
frappe.query_reports["ToDo"] = { | |||||
"filters": [ | |||||
] | |||||
} |
@@ -1,23 +0,0 @@ | |||||
{ | |||||
"add_total_row": 0, | |||||
"apply_user_permissions": 1, | |||||
"creation": "2013-02-25 14:26:30", | |||||
"disabled": 0, | |||||
"docstatus": 0, | |||||
"doctype": "Report", | |||||
"idx": 3, | |||||
"is_standard": "Yes", | |||||
"modified": "2017-02-24 20:13:12.217943", | |||||
"modified_by": "Administrator", | |||||
"module": "Core", | |||||
"name": "ToDo", | |||||
"owner": "Administrator", | |||||
"ref_doctype": "ToDo", | |||||
"report_name": "ToDo", | |||||
"report_type": "Script Report", | |||||
"roles": [ | |||||
{ | |||||
"role": "System Manager" | |||||
} | |||||
] | |||||
} |
@@ -1,35 +0,0 @@ | |||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors | |||||
# MIT License. See license.txt | |||||
from __future__ import unicode_literals | |||||
import frappe | |||||
from frappe import _ | |||||
from frappe.utils import getdate | |||||
def execute(filters=None): | |||||
priority_map = {"High": 3, "Medium": 2, "Low": 1} | |||||
todo_list = frappe.get_list('ToDo', fields=["name", "date", "description", | |||||
"priority", "reference_type", "reference_name", "assigned_by", "owner"], | |||||
filters={'status': 'Open'}) | |||||
todo_list.sort(key=lambda todo: (priority_map.get(todo.priority, 0), | |||||
todo.date and getdate(todo.date) or getdate("1900-01-01")), reverse=True) | |||||
columns = [_("ID")+":Link/ToDo:90", _("Priority")+"::60", _("Date")+ ":Date", | |||||
_("Description")+"::150", _("Assigned To/Owner") + ":Data:120", | |||||
_("Assigned By")+":Data:120", _("Reference")+"::200"] | |||||
result = [] | |||||
for todo in todo_list: | |||||
if todo.owner==frappe.session.user or todo.assigned_by==frappe.session.user: | |||||
if todo.reference_type: | |||||
todo.reference = """<a href="#Form/%s/%s">%s: %s</a>""" % (todo.reference_type, | |||||
todo.reference_name, todo.reference_type, todo.reference_name) | |||||
else: | |||||
todo.reference = None | |||||
result.append([todo.name, todo.priority, todo.date, todo.description, | |||||
todo.owner, todo.assigned_by, todo.reference]) | |||||
return columns, result | |||||
@@ -183,4 +183,5 @@ frappe.patches.v8_0.set_currency_field_precision # 2017-05-09 | |||||
frappe.patches.v8_0.rename_print_to_printing | frappe.patches.v8_0.rename_print_to_printing | ||||
frappe.patches.v7_1.disabled_print_settings_for_custom_print_format | frappe.patches.v7_1.disabled_print_settings_for_custom_print_format | ||||
frappe.patches.v8_0.update_desktop_icons | frappe.patches.v8_0.update_desktop_icons | ||||
frappe.patches.v8_0.update_gender_and_salutation | |||||
frappe.patches.v8_0.update_gender_and_salutation | |||||
execute:frappe.db.sql('update tabReport set module="Desk" where name="ToDo"') |