refactor: Remove unnecessary code

This commit is contained in:
Suraj Shetty 2022-06-01 18:10:30 +05:30
parent 0cd41fbf0c
commit 121fb49fb5
2 changed files with 0 additions and 6 deletions

View file

@ -13,9 +13,6 @@
{% endif %}
</head>
<body>
{% if is_invalid_print %}
{{ body }}
{% else %}
<div class="action-banner print-hide">
<a class="p-2" onclick="window.print();">
{{ _("Print") }}
@ -44,7 +41,6 @@
footer_html.style.marginTop = '20px';
});
</script>
{% endif %}
</body>
{%- if comment -%}
<!-- {{ comment }} -->

View file

@ -47,7 +47,6 @@ def get_context(context):
doctype=frappe.form_dict.doctype, document=frappe.form_dict.name, file_type="PDF", method="Print"
)
is_invalid_print = False
print_style = None
body = get_rendered_template(
doc,
@ -67,7 +66,6 @@ def get_context(context):
"title": frappe.utils.strip_html(doc.get_title()),
"lang": frappe.local.lang,
"layout_direction": "rtl" if is_rtl() else "ltr",
"is_invalid_print": is_invalid_print,
"doctype": frappe.form_dict.doctype,
"name": frappe.form_dict.name,
"key": frappe.form_dict.get("key"),