From 8cb6528c039b341a4173901e3be0a3659d5074dd Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Wed, 2 Oct 2019 13:19:52 +0530 Subject: [PATCH] fix: validate conditions for raw printing --- frappe/printing/doctype/print_format/print_format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/printing/doctype/print_format/print_format.py b/frappe/printing/doctype/print_format/print_format.py index eb39134d02..1c11f2d519 100644 --- a/frappe/printing/doctype/print_format/print_format.py +++ b/frappe/printing/doctype/print_format/print_format.py @@ -34,7 +34,7 @@ class PrintFormat(Document): if self.custom_format and self.raw_printing and not self.raw_commands: frappe.throw(_('{0} are required').format(frappe.bold(_('Raw Commands'))), frappe.MandatoryError) - if self.custom_format and not self.html: + if self.custom_format and not self.html and not self.raw_printing: frappe.throw(_('{0} is required').format(frappe.bold(_('HTML'))), frappe.MandatoryError) def extract_images(self):