From e90a1caeb18011f8da71fa60e7590ab7d585cf7e Mon Sep 17 00:00:00 2001 From: Charles-Henri Decultot Date: Fri, 1 Dec 2017 11:49:45 +0100 Subject: [PATCH] Portal print format correction (#11812) * Portal print format correction * Correction following Rushabh's comment --- erpnext/templates/pages/order.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/templates/pages/order.py b/erpnext/templates/pages/order.py index 110eb57504..2874047ee2 100644 --- a/erpnext/templates/pages/order.py +++ b/erpnext/templates/pages/order.py @@ -24,6 +24,12 @@ def get_context(context): context.enabled_checkout = frappe.get_doc("Shopping Cart Settings").enable_checkout + default_print_format = frappe.db.get_value('Property Setter', dict(property='default_print_format', doc_type=frappe.form_dict.doctype), "value") + if default_print_format: + context.print_format = default_print_format + else: + context.print_format = "Standard" + if not frappe.has_website_permission(context.doc): frappe.throw(_("Not Permitted"), frappe.PermissionError)