diff --git a/msp/fixtures/print_format.json b/msp/fixtures/print_format.json
new file mode 100644
index 0000000..f0ab8cc
--- /dev/null
+++ b/msp/fixtures/print_format.json
@@ -0,0 +1,29 @@
+[
+ {
+ "absolute_value": 0,
+ "align_labels_right": 0,
+ "css": null,
+ "custom_format": 0,
+ "default_print_language": null,
+ "disabled": 0,
+ "doc_type": "MSP Documentation",
+ "docstatus": 0,
+ "doctype": "Print Format",
+ "font": "Default",
+ "format_data": "[{\"fieldname\": \"print_heading_template\", \"fieldtype\": \"Custom HTML\", \"options\": \"
\\r\\n\\t
\\r\\n\\t\\t
\\r\\n\\t\\t\\t

\\r\\n\\t\\t
\\r\\n\\t
\\r\\n\\t
\\r\\n\\t\\t
\\r\\nIT Documentation\\r\\n\\t\\t
{{ doc.name }}
\\r\\n\\t
\\r\\n\\t
\\r\\n\\t\\t

\\r\\n\\t
\\r\\n
\\r\\n\\r\\n\\t
\\r\\n\\t\\t
\\r\\n\\t\\r\\n
\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"customer\", \"print_hide\": 0, \"label\": \"Customer\"}, {\"fieldname\": \"customer_name\", \"print_hide\": 0, \"label\": \"Customer Name\"}, {\"fieldname\": \"generation_date\", \"print_hide\": 0, \"label\": \"Generation Date\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"landscape\", \"print_hide\": 0, \"label\": \"Landscape\"}, {\"fieldname\": \"tactical_rmm_tenant_caption\", \"print_hide\": 0, \"label\": \"Tactical RMM Tenant Caption\"}, {\"fieldtype\": \"Section Break\", \"label\": \"\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"_custom_html\", \"print_hide\": 0, \"label\": \"Custom HTML\", \"fieldtype\": \"HTML\", \"options\": \"Introduction
\\n{{ frappe.utils.md_to_html(doc.introduction) }}\\n
\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Systems from RMM\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"_custom_html\", \"print_hide\": 0, \"label\": \"Custom HTML\", \"fieldtype\": \"HTML\", \"options\": \"Server Systems
\\n{{ frappe.utils.md_to_html(doc.server_list) }}\\n
\"}, {\"fieldname\": \"_custom_html\", \"print_hide\": 0, \"label\": \"Custom HTML\", \"fieldtype\": \"HTML\", \"options\": \"Workstation Systems
\\n{{ frappe.utils.md_to_html(doc.workstation_list) }}\\n
\"}, {\"fieldtype\": \"Section Break\", \"label\": \"Backups\"}, {\"fieldtype\": \"Column Break\"}, {\"fieldname\": \"backup\", \"print_hide\": 0, \"label\": \"Backup\"}, {\"fieldname\": \"aditional_data\", \"print_hide\": 0, \"label\": \"Aditional Data\"}]",
+ "html": null,
+ "line_breaks": 0,
+ "modified": "2023-06-09 07:34:10.957905",
+ "module": "MSP",
+ "name": "Standard IT Landscape Documentation",
+ "parent": null,
+ "parentfield": null,
+ "parenttype": null,
+ "print_format_builder": 1,
+ "print_format_type": "Jinja",
+ "raw_commands": null,
+ "raw_printing": 0,
+ "show_section_headings": 1,
+ "standard": "No"
+ }
+]
\ No newline at end of file
diff --git a/msp/hooks.py b/msp/hooks.py
index 9fdebce..0a3842f 100644
--- a/msp/hooks.py
+++ b/msp/hooks.py
@@ -138,3 +138,7 @@ doc_events = {
override_doctype_class = {
"Location": "msp.overrides.location.CustomLocation.CustomLocation"
}
+
+fixtures = [
+ {"doctype": "Print Format", "filters": {"name": "Standard IT Landscape Documentation"}}
+]
diff --git a/msp/msp/doctype/msp_documentation/msp_documentation.json b/msp/msp/doctype/msp_documentation/msp_documentation.json
index 1e201f6..5aaab09 100644
--- a/msp/msp/doctype/msp_documentation/msp_documentation.json
+++ b/msp/msp/doctype/msp_documentation/msp_documentation.json
@@ -9,6 +9,7 @@
"field_order": [
"landscape",
"customer",
+ "customer_name",
"tactical_rmm_tenant_caption",
"generation_date",
"introduction",
@@ -26,10 +27,12 @@
"options": "IT Landscape"
},
{
+ "fetch_from": "landscape.customer",
"fieldname": "customer",
"fieldtype": "Link",
"label": "Customer",
- "options": "Customer"
+ "options": "Customer",
+ "read_only": 1
},
{
"fieldname": "introduction",
@@ -71,11 +74,18 @@
"fieldname": "workstation_list",
"fieldtype": "Markdown Editor",
"label": "Workstation List"
+ },
+ {
+ "fetch_from": "customer.customer_name",
+ "fieldname": "customer_name",
+ "fieldtype": "Data",
+ "label": "Customer Name",
+ "read_only": 1
}
],
"index_web_pages_for_search": 1,
"links": [],
- "modified": "2023-06-08 21:12:01.615350",
+ "modified": "2023-06-09 07:14:25.256192",
"modified_by": "Administrator",
"module": "MSP",
"name": "MSP Documentation",