Merge pull request #54419 from Nihantra-Patel/fix-default-letterhead-report-validation

fix: set letter_head_for letterhead and remove unknown letterhead from report
This commit is contained in:
Nihantra C. Patel
2026-04-20 17:25:51 +05:30
committed by GitHub
11 changed files with 59 additions and 48 deletions

View File

@@ -1,5 +1,6 @@
{ {
"add_total_row": 0, "add_total_row": 0,
"add_translate_data": 0,
"columns": [], "columns": [],
"creation": "2023-06-27 16:40:15.109554", "creation": "2023-06-27 16:40:15.109554",
"disabled": 0, "disabled": 0,
@@ -9,8 +10,7 @@
"idx": 0, "idx": 0,
"is_standard": "Yes", "is_standard": "Yes",
"json": "{}", "json": "{}",
"letter_head": "LetterHead", "modified": "2026-04-20 16:55:11.962163",
"modified": "2023-06-27 16:40:32.493725",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Accounts", "module": "Accounts",
"name": "Voucher-wise Balance", "name": "Voucher-wise Balance",
@@ -29,5 +29,6 @@
{ {
"role": "Auditor" "role": "Auditor"
} }
] ],
} "timeout": 0
}

View File

@@ -1,14 +1,15 @@
{ {
"add_total_row": 0, "add_total_row": 0,
"add_translate_data": 0,
"columns": [],
"creation": "2020-08-10 18:34:19.083872", "creation": "2020-08-10 18:34:19.083872",
"disable_prepared_report": 0,
"disabled": 0, "disabled": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "Report", "doctype": "Report",
"filters": [],
"idx": 0, "idx": 0,
"is_standard": "Yes", "is_standard": "Yes",
"letter_head": "Test 2", "modified": "2026-04-20 16:55:11.923322",
"modified": "2020-08-10 18:34:19.083872",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "CRM", "module": "CRM",
"name": "First Response Time for Opportunity", "name": "First Response Time for Opportunity",
@@ -24,5 +25,6 @@
{ {
"role": "Sales Manager" "role": "Sales Manager"
} }
] ],
} "timeout": 0
}

View File

@@ -1,14 +1,15 @@
{ {
"add_total_row": 1, "add_total_row": 1,
"add_translate_data": 0,
"columns": [],
"creation": "2020-04-20 18:26:04.345289", "creation": "2020-04-20 18:26:04.345289",
"disable_prepared_report": 0,
"disabled": 0, "disabled": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "Report", "doctype": "Report",
"filters": [],
"idx": 0, "idx": 0,
"is_standard": "Yes", "is_standard": "Yes",
"letter_head": "Gadgets International", "modified": "2026-04-20 16:55:11.891636",
"modified": "2020-04-20 18:26:04.345289",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Manufacturing", "module": "Manufacturing",
"name": "Downtime Analysis", "name": "Downtime Analysis",
@@ -27,5 +28,6 @@
{ {
"role": "Manufacturing Manager" "role": "Manufacturing Manager"
} }
] ],
} "timeout": 0
}

View File

@@ -1,15 +1,16 @@
{ {
"add_total_row": 0, "add_total_row": 0,
"add_translate_data": 0,
"columns": [],
"creation": "2020-04-26 18:23:53.475110", "creation": "2020-04-26 18:23:53.475110",
"disable_prepared_report": 0,
"disabled": 0, "disabled": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "Report", "doctype": "Report",
"filters": [],
"idx": 0, "idx": 0,
"is_standard": "Yes", "is_standard": "Yes",
"json": "{}", "json": "{}",
"letter_head": "Gadgets International", "modified": "2026-04-20 16:55:11.903547",
"modified": "2020-04-26 18:24:50.529940",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Manufacturing", "module": "Manufacturing",
"name": "Quality Inspection Summary", "name": "Quality Inspection Summary",
@@ -28,5 +29,6 @@
{ {
"role": "Stock Manager" "role": "Stock Manager"
} }
] ],
} "timeout": 0
}

View File

@@ -1,16 +1,15 @@
{ {
"add_total_row": 0, "add_total_row": 0,
"add_translate_data": 0,
"columns": [], "columns": [],
"creation": "2021-11-22 17:36:11.886939", "creation": "2021-11-22 17:36:11.886939",
"disable_prepared_report": 0,
"disabled": 0, "disabled": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "Report", "doctype": "Report",
"filters": [], "filters": [],
"idx": 0, "idx": 0,
"is_standard": "Yes", "is_standard": "Yes",
"letter_head": "Gadgets International", "modified": "2026-04-20 16:55:11.935728",
"modified": "2021-11-22 17:36:14.999091",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Manufacturing", "module": "Manufacturing",
"name": "Work Order Consumed Materials", "name": "Work Order Consumed Materials",
@@ -26,5 +25,6 @@
{ {
"role": "Stock User" "role": "Stock User"
} }
] ],
} "timeout": 0
}

View File

@@ -1,14 +1,15 @@
{ {
"add_total_row": 0, "add_total_row": 0,
"add_translate_data": 0,
"columns": [],
"creation": "2020-04-17 17:07:56.830358", "creation": "2020-04-17 17:07:56.830358",
"disable_prepared_report": 0,
"disabled": 0, "disabled": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "Report", "doctype": "Report",
"filters": [],
"idx": 0, "idx": 0,
"is_standard": "Yes", "is_standard": "Yes",
"letter_head": "Gadgets International", "modified": "2026-04-20 16:55:11.869366",
"modified": "2020-04-19 16:59:47.979278",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Manufacturing", "module": "Manufacturing",
"name": "Work Order Summary", "name": "Work Order Summary",
@@ -27,5 +28,6 @@
{ {
"role": "Manufacturing Manager" "role": "Manufacturing Manager"
} }
] ],
} "timeout": 0
}

View File

@@ -1,5 +1,6 @@
{ {
"add_total_row": 1, "add_total_row": 1,
"add_translate_data": 0,
"columns": [], "columns": [],
"creation": "2023-10-10 23:53:43.692067", "creation": "2023-10-10 23:53:43.692067",
"disabled": 0, "disabled": 0,
@@ -8,9 +9,7 @@
"filters": [], "filters": [],
"idx": 0, "idx": 0,
"is_standard": "Yes", "is_standard": "Yes",
"letter_head": "ALYF GmbH", "modified": "2026-04-20 16:55:11.807564",
"letterhead": null,
"modified": "2023-10-11 00:58:30.639078",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Projects", "module": "Projects",
"name": "Timesheet Billing Summary", "name": "Timesheet Billing Summary",
@@ -38,5 +37,6 @@
{ {
"role": "Employee Self Service" "role": "Employee Self Service"
} }
] ],
} "timeout": 0
}

View File

@@ -359,6 +359,7 @@ def create_letter_head():
"source": "HTML", "source": "HTML",
"content": content, "content": content,
"is_default": 1 if name == "Company Letterhead - Grey" else 0, "is_default": 1 if name == "Company Letterhead - Grey" else 0,
"letter_head_for": "Report",
} }
) )
doc.insert(ignore_permissions=True) doc.insert(ignore_permissions=True)

View File

@@ -1,16 +1,15 @@
{ {
"add_total_row": 0, "add_total_row": 0,
"add_translate_data": 0,
"columns": [], "columns": [],
"creation": "2022-05-11 04:09:13.460652", "creation": "2022-05-11 04:09:13.460652",
"disable_prepared_report": 0,
"disabled": 0, "disabled": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "Report", "doctype": "Report",
"filters": [], "filters": [],
"idx": 0, "idx": 0,
"is_standard": "Yes", "is_standard": "Yes",
"letter_head": "abc", "modified": "2026-04-20 16:55:11.950413",
"modified": "2022-05-11 04:09:20.232177",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "FIFO Queue vs Qty After Transaction Comparison", "name": "FIFO Queue vs Qty After Transaction Comparison",
@@ -23,5 +22,6 @@
{ {
"role": "Administrator" "role": "Administrator"
} }
] ],
} "timeout": 0
}

View File

@@ -1,5 +1,6 @@
{ {
"add_total_row": 0, "add_total_row": 0,
"add_translate_data": 0,
"columns": [], "columns": [],
"creation": "2025-02-03 15:39:44.521366", "creation": "2025-02-03 15:39:44.521366",
"disabled": 0, "disabled": 0,
@@ -9,9 +10,7 @@
"idx": 0, "idx": 0,
"is_standard": "Yes", "is_standard": "Yes",
"json": "{}", "json": "{}",
"letter_head": null, "modified": "2026-04-20 16:55:11.972979",
"letterhead": null,
"modified": "2025-02-03 15:39:47.613040",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Stock", "module": "Stock",
"name": "Incorrect Serial and Batch Bundle", "name": "Incorrect Serial and Batch Bundle",
@@ -53,4 +52,4 @@
} }
], ],
"timeout": 0 "timeout": 0
} }

View File

@@ -1,14 +1,15 @@
{ {
"add_total_row": 0, "add_total_row": 0,
"add_translate_data": 0,
"columns": [],
"creation": "2020-08-10 18:12:42.391224", "creation": "2020-08-10 18:12:42.391224",
"disable_prepared_report": 0,
"disabled": 0, "disabled": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "Report", "doctype": "Report",
"filters": [],
"idx": 0, "idx": 0,
"is_standard": "Yes", "is_standard": "Yes",
"letter_head": "Test 2", "modified": "2026-04-20 16:55:11.913714",
"modified": "2020-08-10 18:12:42.391224",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Support", "module": "Support",
"name": "First Response Time for Issues", "name": "First Response Time for Issues",
@@ -22,5 +23,6 @@
{ {
"role": "Support Team" "role": "Support Team"
} }
] ],
} "timeout": 0
}