Merge pull request #24446 from deepeshgarg007/patch-fix-1-new
fix: Project Template patch
This commit is contained in:
commit
164079127f
@ -7,16 +7,19 @@ import frappe
|
|||||||
def execute():
|
def execute():
|
||||||
frappe.reload_doc("projects", "doctype", "project_template")
|
frappe.reload_doc("projects", "doctype", "project_template")
|
||||||
frappe.reload_doc("projects", "doctype", "project_template_task")
|
frappe.reload_doc("projects", "doctype", "project_template_task")
|
||||||
frappe.reload_doc("projects", "doctype", "project_template")
|
|
||||||
frappe.reload_doc("projects", "doctype", "task")
|
frappe.reload_doc("projects", "doctype", "task")
|
||||||
|
|
||||||
for template_name in frappe.db.sql("""
|
# Update property setter status if any
|
||||||
select
|
property_setter = frappe.db.get_value('Property Setter', {'doc_type': 'Task',
|
||||||
name
|
'field_name': 'status', 'property': 'options'})
|
||||||
from
|
|
||||||
`tabProject Template` """,
|
|
||||||
as_dict=1):
|
|
||||||
|
|
||||||
|
if property_setter:
|
||||||
|
property_setter_doc = frappe.get_doc('Property Setter', {'doc_type': 'Task',
|
||||||
|
'field_name': 'status', 'property': 'options'})
|
||||||
|
property_setter_doc.value += "\nTemplate"
|
||||||
|
property_setter_doc.save()
|
||||||
|
|
||||||
|
for template_name in frappe.get_all('Project Template'):
|
||||||
template = frappe.get_doc("Project Template", template_name.name)
|
template = frappe.get_doc("Project Template", template_name.name)
|
||||||
replace_tasks = False
|
replace_tasks = False
|
||||||
new_tasks = []
|
new_tasks = []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user