fix: validate conditions for raw printing

This commit is contained in:
Shivam Mishra 2019-10-02 13:19:52 +05:30
parent a1c8a9bdc2
commit 8cb6528c03

View file

@ -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):