mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-07 14:12:52 +02:00
feat: add project filter to Delayed Tasks Summary report
(cherry picked from commit 88097e78d2)
This commit is contained in:
@@ -3,6 +3,12 @@
|
|||||||
|
|
||||||
frappe.query_reports["Delayed Tasks Summary"] = {
|
frappe.query_reports["Delayed Tasks Summary"] = {
|
||||||
filters: [
|
filters: [
|
||||||
|
{
|
||||||
|
fieldname: "project",
|
||||||
|
label: __("Project"),
|
||||||
|
fieldtype: "Link",
|
||||||
|
options: "Project",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
fieldname: "from_date",
|
fieldname: "from_date",
|
||||||
label: __("From Date"),
|
label: __("From Date"),
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ def get_data(filters):
|
|||||||
fields=[
|
fields=[
|
||||||
"name",
|
"name",
|
||||||
"subject",
|
"subject",
|
||||||
|
"project",
|
||||||
"exp_start_date",
|
"exp_start_date",
|
||||||
"exp_end_date",
|
"exp_end_date",
|
||||||
"status",
|
"status",
|
||||||
@@ -56,7 +57,7 @@ def get_data(filters):
|
|||||||
|
|
||||||
def get_conditions(filters):
|
def get_conditions(filters):
|
||||||
conditions = frappe._dict()
|
conditions = frappe._dict()
|
||||||
keys = ["priority", "status"]
|
keys = ["priority", "status", "project"]
|
||||||
for key in keys:
|
for key in keys:
|
||||||
if filters.get(key):
|
if filters.get(key):
|
||||||
conditions[key] = filters.get(key)
|
conditions[key] = filters.get(key)
|
||||||
@@ -89,6 +90,13 @@ def get_columns():
|
|||||||
columns = [
|
columns = [
|
||||||
{"fieldname": "name", "fieldtype": "Link", "label": _("Task"), "options": "Task", "width": 150},
|
{"fieldname": "name", "fieldtype": "Link", "label": _("Task"), "options": "Task", "width": 150},
|
||||||
{"fieldname": "subject", "fieldtype": "Data", "label": _("Subject"), "width": 200},
|
{"fieldname": "subject", "fieldtype": "Data", "label": _("Subject"), "width": 200},
|
||||||
|
{
|
||||||
|
"fieldname": "project",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": _("Project"),
|
||||||
|
"options": "Project",
|
||||||
|
"width": 150,
|
||||||
|
},
|
||||||
{"fieldname": "status", "fieldtype": "Data", "label": _("Status"), "width": 100},
|
{"fieldname": "status", "fieldtype": "Data", "label": _("Status"), "width": 100},
|
||||||
{"fieldname": "priority", "fieldtype": "Data", "label": _("Priority"), "width": 80},
|
{"fieldname": "priority", "fieldtype": "Data", "label": _("Priority"), "width": 80},
|
||||||
{"fieldname": "progress", "fieldtype": "Data", "label": _("Progress (%)"), "width": 120},
|
{"fieldname": "progress", "fieldtype": "Data", "label": _("Progress (%)"), "width": 120},
|
||||||
|
|||||||
Reference in New Issue
Block a user