Item groups to project template.
This commit is contained in:
parent
b0a5ddfbed
commit
82e8086436
@ -5,8 +5,8 @@
|
||||
"company": "Sprinklers Northwest",
|
||||
"docstatus": 0,
|
||||
"doctype": "Project Template",
|
||||
"item_groups": null,
|
||||
"modified": "2026-01-29 09:51:46.681553",
|
||||
"item_groups": "SNW-I, SNW-S, SNW-LS",
|
||||
"modified": "2026-02-10 10:29:37.435176",
|
||||
"name": "SNW Install",
|
||||
"project_type": "External",
|
||||
"tasks": [
|
||||
|
||||
@ -725,15 +725,23 @@ def create_project_templates():
|
||||
"""Create default Project Templates if they do not exist."""
|
||||
print("\n🔧 Checking for default Project Templates...")
|
||||
templates = {
|
||||
"snw_templates": [
|
||||
"Sprinklers Northwest": [
|
||||
{
|
||||
"name": "SNW Install",
|
||||
"project_type": "Service",
|
||||
"company": "Sprinklers Northwest",
|
||||
"calendar_color": "#FF5733" # Example color
|
||||
}
|
||||
]
|
||||
}
|
||||
"calendar_color": "#FF5733", # Example color
|
||||
"item_groups": "SNW-I, SNW-S, SNW-LS"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
for company, template_list in templates.items():
|
||||
for template in template_list:
|
||||
if frappe.db.exists("Project Template", template["name"]):
|
||||
continue
|
||||
|
||||
doc = frappe.get_doc(template)
|
||||
doc.insert(ignore_permissions=True)
|
||||
|
||||
|
||||
def create_bid_meeting_note_form_templates():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user