Browse Source

fix: patch and columns

develop
pateljannat 4 years ago
parent
commit
fd5ebe9d4a
  1. 9
      erpnext/patches/v13_0/update_project_template_tasks.py
  2. 4
      erpnext/projects/doctype/project_template_task/project_template_task.json

9
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()

4
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",

Loading…
Cancel
Save