[fix] encode if letterhead
This commit is contained in:
parent
fc318ebeff
commit
4c58299eb0
@ -40,12 +40,12 @@ def create_customers(args_data):
|
||||
@frappe.whitelist()
|
||||
def create_letterhead(args_data):
|
||||
args = json.loads(args_data)
|
||||
letterhead = args.get("letterhead").encode('utf-8')
|
||||
letterhead = args.get("letterhead")
|
||||
if letterhead:
|
||||
try:
|
||||
frappe.get_doc({
|
||||
"doctype":"Letter Head",
|
||||
"content":"""<div><img src="{0}" style='max-width: 100%%;'><br></div>""".format(letterhead),
|
||||
"content":"""<div><img src="{0}" style='max-width: 100%%;'><br></div>""".format(letterhead.encode('utf-8')),
|
||||
"letter_head_name": _("Standard"),
|
||||
"is_default": 1
|
||||
}).insert()
|
||||
|
Loading…
x
Reference in New Issue
Block a user