fix: print format value

This commit is contained in:
Jannat Patel
2023-08-09 17:03:10 +05:30
parent 59f08ad4da
commit 066e2ddc69
2 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
{ {
"absolute_value": 0, "absolute_value": 0,
"align_labels_right": 0, "align_labels_right": 0,
"creation": "2023-08-09 16:46:41.214175", "creation": "2023-08-09 17:02:21.430320",
"css": ".outer-border {\n font-family: \"Inter\" sans-serif;\n font-size: 16px;\n border-radius: 0.5rem;\n border: 1px solid #E2E6E9;\n padding: 1rem;\n}\n\n.inner-border {\n border: 10px solid #0089FF;\n border-radius: 8px;\n text-align: center;\n padding: 6rem 4rem;\n background-color: #FFFFFF;\n}\n\n.certificate-logo {\n height: 1.5rem;\n margin-bottom: 4rem;\n}\n\n.certificate-name {\n font-size: 2rem;\n font-weight: 500;\n color: #192734;\n margin-bottom: 0.5rem;\n}\n\n.certificate-footer {\n margin: 4rem auto 0;\n width: 70%;\n text-align: center;\n}\n\n.certificate-footer-item {\n color: #192734;\n}\n\n.cursive-font {\n font-family: cursive;\n font-weight: 600;\n}\n\n.certificate-divider {\n margin: 0.5rem 0;\n}\n\n.certificate-expiry {\n margin-left: 2rem;\n}", "css": ".outer-border {\n font-family: \"Inter\" sans-serif;\n font-size: 16px;\n border-radius: 0.5rem;\n border: 1px solid #E2E6E9;\n padding: 1rem;\n}\n\n.inner-border {\n border: 10px solid #0089FF;\n border-radius: 8px;\n text-align: center;\n padding: 6rem 4rem;\n background-color: #FFFFFF;\n}\n\n.certificate-logo {\n height: 1.5rem;\n margin-bottom: 4rem;\n}\n\n.certificate-name {\n font-size: 2rem;\n font-weight: 500;\n color: #192734;\n margin-bottom: 0.5rem;\n}\n\n.certificate-footer {\n margin: 4rem auto 0;\n width: 70%;\n text-align: center;\n}\n\n.certificate-footer-item {\n color: #192734;\n}\n\n.cursive-font {\n font-family: cursive;\n font-weight: 600;\n}\n\n.certificate-divider {\n margin: 0.5rem 0;\n}\n\n.certificate-expiry {\n margin-left: 2rem;\n}",
"custom_format": 1, "custom_format": 1,
"disabled": 0, "disabled": 0,
@@ -17,7 +17,7 @@
"margin_left": 0.0, "margin_left": 0.0,
"margin_right": 0.0, "margin_right": 0.0,
"margin_top": 0.0, "margin_top": 0.0,
"modified": "2023-08-09 16:46:41.214175", "modified": "2023-08-09 17:02:21.430320",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "LMS", "module": "LMS",
"name": "Certificate", "name": "Certificate",

View File

@@ -34,7 +34,7 @@ def get_context(context):
print_format = get_print_format() print_format = get_print_format()
template = frappe.db.get_value( template = frappe.db.get_value(
"Print Format", print_format.value, ["html", "css"], as_dict=True "Print Format", print_format, ["html", "css"], as_dict=True
) )
merged_template = "<style> " + template.css + " </style>" + template.html merged_template = "<style> " + template.css + " </style>" + template.html
final_template = render_template(merged_template, context) final_template = render_template(merged_template, context)