Major dispatch/task system overhaul: - Project templates with 3-step wizard (choose template → edit steps → publish) - 4 built-in templates: phone service, fiber install, move, repair - Nested task tree with recursive TaskNode component (parent_job hierarchy) - n8n webhook integration (on_open_webhook, on_close_webhook per task) - Inline task editing: status, priority, type, tech assignment, tags, delete - Tech assignment + tags from ticket modal → jobs appear on dispatch timeline - ERPNext custom fields: parent_job, on_open_webhook, on_close_webhook, step_order - Refactored ClientDetailPage, ChatterPanel, DetailModal, dispatch store - CSS consolidation, dead code cleanup, composable extraction - Dashboard KPIs with dispatch integration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
25 lines
771 B
Python
25 lines
771 B
Python
import frappe
|
|
|
|
def add_depends_on():
|
|
"""Add depends_on field to Dispatch Job."""
|
|
fieldname = "depends_on"
|
|
if frappe.db.exists("Custom Field", {"dt": "Dispatch Job", "fieldname": fieldname}):
|
|
print(f" Field {fieldname} already exists, skipping.")
|
|
return
|
|
frappe.get_doc({
|
|
"doctype": "Custom Field",
|
|
"dt": "Dispatch Job",
|
|
"fieldname": "depends_on",
|
|
"fieldtype": "Link",
|
|
"label": "Dépend de",
|
|
"options": "Dispatch Job",
|
|
"insert_after": "source_issue",
|
|
}).insert(ignore_permissions=True)
|
|
frappe.db.commit()
|
|
print(f" ✓ Dispatch Job.depends_on field added.")
|
|
|
|
if __name__ == "__main__":
|
|
frappe.connect(site="erp.gigafibre.ca")
|
|
add_depends_on()
|
|
frappe.destroy()
|