From fd5ebe9d4a757c5ded79b2cc2e698695e21f2ce8 Mon Sep 17 00:00:00 2001 From: pateljannat Date: Thu, 7 Jan 2021 15:16:15 +0530 Subject: [PATCH] fix: patch and columns --- erpnext/patches/v13_0/update_project_template_tasks.py | 9 +++++++-- .../project_template_task/project_template_task.json | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/erpnext/patches/v13_0/update_project_template_tasks.py b/erpnext/patches/v13_0/update_project_template_tasks.py index f24a2c62f1..886616e0ca 100644 --- a/erpnext/patches/v13_0/update_project_template_tasks.py +++ b/erpnext/patches/v13_0/update_project_template_tasks.py @@ -8,6 +8,8 @@ def execute(): frappe.reload_doc("projects", "doctype", "project_template") frappe.reload_doc("projects", "doctype", "project_template_task") frappe.reload_doc("projects", "doctype", "project_template") + frappe.reload_doc("projects", "doctype", "task") + for template_name in frappe.db.sql(""" select name @@ -30,11 +32,14 @@ def execute(): description = task.description, is_template = 1 )).insert() - new_tasks.append(new_task.name) + print(new_task) + new_tasks.append(new_task) if replace_tasks: template.tasks = [] for tsk in new_tasks: + print(tsk.name, tsk.subject) template.append("tasks", { - "task": tsk + "task": tsk.name, + "subject": tsk.subject }) template.save() \ No newline at end of file diff --git a/erpnext/projects/doctype/project_template_task/project_template_task.json b/erpnext/projects/doctype/project_template_task/project_template_task.json index 7a552945bd..69530b15b4 100644 --- a/erpnext/projects/doctype/project_template_task/project_template_task.json +++ b/erpnext/projects/doctype/project_template_task/project_template_task.json @@ -10,6 +10,7 @@ ], "fields": [ { + "columns": 2, "fieldname": "task", "fieldtype": "Link", "in_list_view": 1, @@ -18,6 +19,7 @@ "reqd": 1 }, { + "columns": 6, "fieldname": "subject", "fieldtype": "Read Only", "in_list_view": 1, @@ -26,7 +28,7 @@ ], "istable": 1, "links": [], - "modified": "2020-12-28 12:10:26.321913", + "modified": "2021-01-07 15:13:40.995071", "modified_by": "Administrator", "module": "Projects", "name": "Project Template Task",