fix: letterhead image doesn't show up in pdf

This commit is contained in:
prssanna 2021-02-05 11:45:40 +05:30
parent f95d34918d
commit 898922f03e

View file

@ -20,7 +20,7 @@ class LetterHead(Document):
def set_image(self):
if self.source=='Image':
if self.image and is_image(self.image):
self.content = '<img src="{}" style="width: 100%;">'.format(self.image)
self.content = '<img src="{}">'.format(self.image)
frappe.msgprint(frappe._('Header HTML set from attachment {0}').format(self.image), alert = True)
else:
frappe.msgprint(frappe._('Please attach an image file to set HTML'), alert = True, indicator = 'orange')