Portal print format correction (#11812)

* Portal print format correction

* Correction following Rushabh's comment
This commit is contained in:
Charles-Henri Decultot 2017-12-01 11:49:45 +01:00 committed by Nabin Hait
parent 9e27b347ca
commit e90a1caeb1

View File

@ -24,6 +24,12 @@ def get_context(context):
context.enabled_checkout = frappe.get_doc("Shopping Cart Settings").enable_checkout 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): if not frappe.has_website_permission(context.doc):
frappe.throw(_("Not Permitted"), frappe.PermissionError) frappe.throw(_("Not Permitted"), frappe.PermissionError)