feat: add fixture seed data for portability

- Added fixture config in hooks.py for Workspace, Resource Center,
  Engagement Recipe, and Engagement Order
- Exported workspace.json (3 Service Factory workspaces)
- Created resource_center.json seed data (Engineering Team,
  Solutions Consulting)
- All configuration is now version-controlled and portable
  via 'bench migrate' on any server
This commit is contained in:
Claus Lohmar 2026-07-15 21:53:44 +00:00
parent 6afe8c7d7a
commit e24c3e2a72
3 changed files with 748 additions and 2 deletions

View file

@ -0,0 +1,20 @@
[
{
"center_name": "Engineering Team",
"resource_type": "Engineering",
"hourly_cost_rate": 75.0,
"hourly_billing_rate": 150.0,
"daily_capacity_hours": 40.0,
"members": [],
"doctype": "Resource Center"
},
{
"center_name": "Solutions Consulting",
"resource_type": "Consulting",
"hourly_cost_rate": 100.0,
"hourly_billing_rate": 200.0,
"daily_capacity_hours": 24.0,
"members": [],
"doctype": "Resource Center"
}
]

View file

@ -0,0 +1,721 @@
[
{
"app": null,
"charts": [],
"content": "[{\"id\":\"manager_header_1\",\"type\":\"header\",\"data\":{\"text\":\"<span class=\\\"h4\\\"><b>Operational Overview</b></span>\",\"col\":12}},{\"id\":\"manager_card_orders\",\"type\":\"card\",\"data\":{\"card_name\":\"Engagement Orders\",\"col\":4}},{\"id\":\"manager_card_centers\",\"type\":\"card\",\"data\":{\"card_name\":\"Resource Centers\",\"col\":4}},{\"id\":\"manager_card_recipes\",\"type\":\"card\",\"data\":{\"card_name\":\"Engagement Recipes\",\"col\":4}},{\"id\":\"manager_spacer_1\",\"type\":\"spacer\",\"data\":{\"col\":12}},{\"id\":\"manager_header_2\",\"type\":\"header\",\"data\":{\"text\":\"<span class=\\\"h4\\\"><b>Resource Capacity</b></span>\",\"col\":12}},{\"id\":\"manager_card_gantt\",\"type\":\"card\",\"data\":{\"card_name\":\"Schedule Gantt\",\"col\":6}},{\"id\":\"manager_card_alerts\",\"type\":\"card\",\"data\":{\"card_name\":\"Capacity Alerts\",\"col\":6}},{\"id\":\"manager_spacer_2\",\"type\":\"spacer\",\"data\":{\"col\":12}},{\"id\":\"manager_header_3\",\"type\":\"header\",\"data\":{\"text\":\"<span class=\\\"h4\\\"><b>Key Metrics</b></span>\",\"col\":12}},{\"id\":\"manager_shortcut_active\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Active Engagements\",\"col\":3}},{\"id\":\"manager_shortcut_stalled\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Stalled / Blocked\",\"col\":3}},{\"id\":\"manager_shortcut_capacity\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Capacity Overview\",\"col\":3}},{\"id\":\"manager_shortcut_executions\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"All Execution Cards\",\"col\":3}}]",
"custom_blocks": [],
"docstatus": 0,
"doctype": "Workspace",
"external_link": null,
"for_user": "",
"hide_custom": 0,
"icon": "share",
"indicator_color": null,
"is_hidden": 0,
"label": "Manager Workspace",
"link_to": null,
"link_type": null,
"links": [
{
"dependencies": null,
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Engagement Orders",
"link_count": 4,
"link_to": null,
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Card Break"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Engagement Order",
"link_count": 0,
"link_to": "Engagement Order",
"link_type": "DocType",
"onboard": 1,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Scheduled Orders",
"link_count": 0,
"link_to": "Engagement Order",
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "In Progress Orders",
"link_count": 0,
"link_to": "Engagement Order",
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Completed Orders",
"link_count": 0,
"link_to": "Engagement Order",
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": null,
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Resource Centers",
"link_count": 2,
"link_to": null,
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Card Break"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Resource Center",
"link_count": 0,
"link_to": "Resource Center",
"link_type": "DocType",
"onboard": 1,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Resource Center Members",
"link_count": 0,
"link_to": "Resource Center Member",
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": null,
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Engagement Recipes",
"link_count": 2,
"link_to": null,
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Card Break"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Engagement Recipe",
"link_count": 0,
"link_to": "Engagement Recipe",
"link_type": "DocType",
"onboard": 1,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Engagement Recipe Steps",
"link_count": 0,
"link_to": "Engagement Recipe Step",
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": null,
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Execution Tracking",
"link_count": 2,
"link_to": null,
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Card Break"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Execution Card",
"link_count": 0,
"link_to": "Execution Card",
"link_type": "DocType",
"onboard": 1,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Execution Card Logs",
"link_count": 0,
"link_to": "Execution Card Log",
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
}
],
"modified": "2026-07-15 19:00:00",
"module": "Service Factory",
"name": "Manager Workspace",
"number_cards": [],
"parent_page": "",
"public": 1,
"quick_lists": [],
"restrict_to_domain": null,
"roles": [],
"sequence_id": 2.0,
"shortcuts": [
{
"color": "Blue",
"doc_view": null,
"format": "{}",
"icon": "list",
"kanban_board": null,
"label": "Active Engagements",
"link_to": "Engagement Order",
"report_ref_doctype": null,
"restrict_to_domain": null,
"stats_filter": "[[\"Engagement Order\",\"status\",\"in\",[\"Scheduled\",\"In Progress\"]]]",
"type": "DocType",
"url": null
},
{
"color": "Red",
"doc_view": null,
"format": "{}",
"icon": "info",
"kanban_board": null,
"label": "Stalled / Blocked",
"link_to": "Engagement Order",
"report_ref_doctype": null,
"restrict_to_domain": null,
"stats_filter": "[[\"Engagement Order\",\"status\",\"=\",\"On Hold\"]]",
"type": "DocType",
"url": null
},
{
"color": "Green",
"doc_view": null,
"format": "{}",
"icon": "organization",
"kanban_board": null,
"label": "Capacity Overview",
"link_to": "Resource Center",
"report_ref_doctype": null,
"restrict_to_domain": null,
"stats_filter": "[]",
"type": "DocType",
"url": null
},
{
"color": "Grey",
"doc_view": null,
"format": "{}",
"icon": "check",
"kanban_board": null,
"label": "All Execution Cards",
"link_to": "Execution Card",
"report_ref_doctype": null,
"restrict_to_domain": null,
"stats_filter": "[]",
"type": "DocType",
"url": null
}
],
"title": "Manager Workspace",
"type": "Workspace"
},
{
"app": null,
"charts": [],
"content": "[{\"id\":\"director_header_1\",\"type\":\"header\",\"data\":{\"text\":\"<span class=\\\"h4\\\"><b>Financial Margin Ledger</b></span>\",\"col\":12}},{\"id\":\"director_card_margin\",\"type\":\"card\",\"data\":{\"card_name\":\"Margin Overview\",\"col\":6}},{\"id\":\"director_card_pnl\",\"type\":\"card\",\"data\":{\"card_name\":\"P&amp;L Summary\",\"col\":6}},{\"id\":\"director_spacer_1\",\"type\":\"spacer\",\"data\":{\"col\":12}},{\"id\":\"director_header_2\",\"type\":\"header\",\"data\":{\"text\":\"<span class=\\\"h4\\\"><b>Delivery Performance</b></span>\",\"col\":12}},{\"id\":\"director_card_efficiency\",\"type\":\"card\",\"data\":{\"card_name\":\"Delivery Efficiency\",\"col\":6}},{\"id\":\"director_card_burn\",\"type\":\"card\",\"data\":{\"card_name\":\"Resource Burn-Down\",\"col\":6}},{\"id\":\"director_spacer_2\",\"type\":\"spacer\",\"data\":{\"col\":12}},{\"id\":\"director_header_3\",\"type\":\"header\",\"data\":{\"text\":\"<span class=\\\"h4\\\"><b>Executive KPIs</b></span>\",\"col\":12}},{\"id\":\"director_shortcut_revenue\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Revenue Pipeline\",\"col\":3}},{\"id\":\"director_shortcut_costs\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Delivery Costs\",\"col\":3}},{\"id\":\"director_shortcut_margin\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Gross Margin %\",\"col\":3}},{\"id\":\"director_shortcut_utilization\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"Utilization Rate\",\"col\":3}}]",
"custom_blocks": [],
"docstatus": 0,
"doctype": "Workspace",
"external_link": null,
"for_user": "",
"hide_custom": 0,
"icon": "chart",
"indicator_color": null,
"is_hidden": 0,
"label": "Director Workspace",
"link_to": null,
"link_type": null,
"links": [
{
"dependencies": null,
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Financial Overview",
"link_count": 3,
"link_to": null,
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Card Break"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Engagement Order",
"link_count": 0,
"link_to": "Engagement Order",
"link_type": "DocType",
"onboard": 1,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Execution Card",
"link_count": 0,
"link_to": "Execution Card",
"link_type": "DocType",
"onboard": 1,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Resource Center",
"link_count": 0,
"link_to": "Resource Center",
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": null,
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Analytics",
"link_count": 4,
"link_to": null,
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Card Break"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "All Orders",
"link_count": 0,
"link_to": "Engagement Order",
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Completed Orders",
"link_count": 0,
"link_to": "Engagement Order",
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Engagement Recipes",
"link_count": 0,
"link_to": "Engagement Recipe",
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Submitted Cards",
"link_count": 0,
"link_to": "Execution Card",
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
}
],
"modified": "2026-07-15 19:00:00",
"module": "Service Factory",
"name": "Director Workspace",
"number_cards": [],
"parent_page": "",
"public": 1,
"quick_lists": [],
"restrict_to_domain": null,
"roles": [],
"sequence_id": 3.0,
"shortcuts": [
{
"color": "Green",
"doc_view": null,
"format": "{}",
"icon": "currency",
"kanban_board": null,
"label": "Revenue Pipeline",
"link_to": "Engagement Order",
"report_ref_doctype": null,
"restrict_to_domain": null,
"stats_filter": "[[\"Engagement Order\",\"docstatus\",\"=\",1],[\"Engagement Order\",\"status\",\"!=\",\"Cancelled\"]]",
"type": "DocType",
"url": null
},
{
"color": "Red",
"doc_view": null,
"format": "{}",
"icon": "cost",
"kanban_board": null,
"label": "Delivery Costs",
"link_to": "Execution Card",
"report_ref_doctype": null,
"restrict_to_domain": null,
"stats_filter": "[[\"Execution Card\",\"status\",\"=\",\"Submitted\"]]",
"type": "DocType",
"url": null
},
{
"color": "Blue",
"doc_view": null,
"format": "{}",
"icon": "percent",
"kanban_board": null,
"label": "Gross Margin %",
"link_to": "Engagement Order",
"report_ref_doctype": null,
"restrict_to_domain": null,
"stats_filter": "[]",
"type": "DocType",
"url": null
},
{
"color": "Orange",
"doc_view": null,
"format": "{}",
"icon": "chart",
"kanban_board": null,
"label": "Utilization Rate",
"link_to": "Resource Center",
"report_ref_doctype": null,
"restrict_to_domain": null,
"stats_filter": "[]",
"type": "DocType",
"url": null
}
],
"title": "Director Workspace",
"type": "Workspace"
},
{
"app": null,
"charts": [],
"content": "[{\"id\":\"engineer_header_1\",\"type\":\"header\",\"data\":{\"text\":\"<span class=\\\"h4\\\"><b>My Active Deliverables</b></span>\",\"col\":12}},{\"id\":\"engineer_card_my_cards\",\"type\":\"card\",\"data\":{\"card_name\":\"My Execution Cards\",\"col\":4}},{\"id\":\"engineer_card_orders\",\"type\":\"card\",\"data\":{\"card_name\":\"My Engagement Orders\",\"col\":4}},{\"id\":\"engineer_card_reports\",\"type\":\"card\",\"data\":{\"card_name\":\"Reports\",\"col\":4}},{\"id\":\"engineer_spacer_1\",\"type\":\"spacer\",\"data\":{\"col\":12}},{\"id\":\"engineer_header_2\",\"type\":\"header\",\"data\":{\"text\":\"<span class=\\\"h4\\\"><b>Time Tracking</b></span>\",\"col\":12}},{\"id\":\"engineer_card_timer\",\"type\":\"card\",\"data\":{\"card_name\":\"Execution Card Timer\",\"col\":6}},{\"id\":\"engineer_card_hours\",\"type\":\"card\",\"data\":{\"card_name\":\"My Hours This Week\",\"col\":6}},{\"id\":\"engineer_spacer_2\",\"type\":\"spacer\",\"data\":{\"col\":12}},{\"id\":\"engineer_header_3\",\"type\":\"header\",\"data\":{\"text\":\"<span class=\\\"h4\\\"><b>Quick Actions</b></span>\",\"col\":12}},{\"id\":\"engineer_shortcut_new_card\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"New Execution Card\",\"col\":3}},{\"id\":\"engineer_shortcut_active\",\"type\":\"shortcut\",\"data\":{\"shortcut_name\":\"My Active Cards\",\"col\":3}}]",
"custom_blocks": [],
"docstatus": 0,
"doctype": "Workspace",
"external_link": null,
"for_user": "",
"hide_custom": 0,
"icon": "workflow",
"indicator_color": null,
"is_hidden": 0,
"label": "Engineer Workspace",
"link_to": null,
"link_type": null,
"links": [
{
"dependencies": null,
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "My Execution Cards",
"link_count": 3,
"link_to": null,
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Card Break"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Execution Card",
"link_count": 0,
"link_to": "Execution Card",
"link_type": "DocType",
"onboard": 1,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "My Open Cards",
"link_count": 0,
"link_to": "Execution Card",
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "My Submitted Cards",
"link_count": 0,
"link_to": "Execution Card",
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": null,
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "My Engagement Orders",
"link_count": 2,
"link_to": null,
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Card Break"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Engagement Order",
"link_count": 0,
"link_to": "Engagement Order",
"link_type": "DocType",
"onboard": 1,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "My Active Orders",
"link_count": 0,
"link_to": "Engagement Order",
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
},
{
"dependencies": null,
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "Reports",
"link_count": 1,
"link_to": null,
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Card Break"
},
{
"dependencies": "",
"description": null,
"hidden": 0,
"icon": null,
"is_query_report": 0,
"label": "My Hours",
"link_count": 0,
"link_to": "Execution Card",
"link_type": "DocType",
"onboard": 0,
"only_for": null,
"report_ref_doctype": null,
"type": "Link"
}
],
"modified": "2026-07-15 19:00:00",
"module": "Service Factory",
"name": "Engineer Workspace",
"number_cards": [],
"parent_page": "",
"public": 1,
"quick_lists": [],
"restrict_to_domain": null,
"roles": [],
"sequence_id": 1.0,
"shortcuts": [
{
"color": "Blue",
"doc_view": null,
"format": "{}",
"icon": "add",
"kanban_board": null,
"label": "New Execution Card",
"link_to": "Execution Card",
"report_ref_doctype": null,
"restrict_to_domain": null,
"stats_filter": "[]",
"type": "DocType",
"url": null
},
{
"color": "Grey",
"doc_view": null,
"format": "{}",
"icon": "list",
"kanban_board": null,
"label": "My Active Cards",
"link_to": "Execution Card",
"report_ref_doctype": null,
"restrict_to_domain": null,
"stats_filter": "[[\"Execution Card\",\"assigned_employee\",\"=\",\"__user_employee__\"],[\"Execution Card\",\"status\",\"in\",[\"Open\",\"Running\",\"Paused\"]]]",
"type": "DocType",
"url": null
}
],
"title": "Engineer Workspace",
"type": "Workspace"
}
]

View file

@ -167,12 +167,17 @@ doctype_js = {"Execution Card" : "doctype/execution_card/execution_card.js"}
# ],
# }
# Fixtures - sync Workspaces during migrate
# Fixtures - seed data synced during bench migrate
# Add new DocType records here to make them portable
# across all server instances.
# -----------------------------------------
fixtures = [
{"dt": "Workspace", "filters": [
["module", "=", "Service Factory"]
]}
]},
{"dt": "Resource Center"},
{"dt": "Engagement Recipe"},
{"dt": "Engagement Order"},
]
# Testing