Merge pull request #5109 from achillesrasquinha/save-doctype-py3

Save and Make Boilerplates for DocTypes
This commit is contained in:
Achilles Rasquinha 2018-03-02 16:57:50 +05:30 committed by GitHub
commit 9aabd26580
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -224,7 +224,7 @@ def make_boilerplate(template, doc, opts=None):
with open(target_file_path, 'w') as target:
with open(os.path.join(get_module_path("core"), "doctype", scrub(doc.doctype),
"boilerplate", template), 'r') as source:
target.write(frappe.utils.encode(
target.write(frappe.as_unicode(
frappe.utils.cstr(source.read()).format(
app_publisher=app_publisher,
year=frappe.utils.nowdate()[:4],